1
General / My thread isn't running
« on: January 21, 2012, 04:39:12 am »
Hey all, I'm new here, and pretty new to multithreading.
I'm using SFML threads as a class, and here's the class code:
And here's where the thread is SUPPOSED to start:
But the thread isn't launching/running at all, not sure what to do.
Thanks in advance!
I'm using SFML threads as a class, and here's the class code:
Code: [Select]
class SendUsers : public sf::Thread
{
public:
double sock;
private:
virtual void Run()
{
// Print something...
cout << "Cheers" << endl;
}
};
And here's where the thread is SUPPOSED to start:
Code: [Select]
SendUsers t;
t.sock=Players[i].Sock; //Players[i].Sock is a double
t.Launch();
But the thread isn't launching/running at all, not sure what to do.
Thanks in advance!