Home Help Center

How re-start the thread

levellevel Member ✭✭
I make a WorkQueue inherited from IceUtil::Thread;
like this
WorkQueuePtr h = new WorkQueue();
IceUtil::ThreadControl control = h->start();
First I call
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 ?


  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    Threads cannot be restarted. You must create a new thread.
Sign In or Register to comment.