Archived
This forum has been archived. Please start a new discussion on GitHub.
How re-start the thread
in Help Center
I make a WorkQueue inherited from IceUtil::Thread;
like this
WorkQueuePtr h = new WorkQueue();
IceUtil::ThreadControl control = h->start();
First I call
control.yield();
want to stop the h thread.
And I call
control = h->start();
again .this code throw.
.\Thread.cpp:227: IceUtil::ThreadStartedException
My question is how can I re-start a thread ?
like this
WorkQueuePtr h = new WorkQueue();
IceUtil::ThreadControl control = h->start();
First I call
control.yield();
want to stop the h thread.
And I call
control = h->start();
again .this code throw.
.\Thread.cpp:227: IceUtil::ThreadStartedException
My question is how can I re-start a thread ?
0
Comments
-
Threads cannot be restarted. You must create a new thread.0