threads: Waiting for event & shutdown socket

Benjamin Schulte Aldoric at gmx.de
Wed May 30 14:09:31 PDT 2007


Hi!

Just two other problems - now coming with threads.

First:
Is there something like the WinAPI method 'WaitForSingleObject'?

Some methods like
while( threadEventIsSet ) { Sleep(10); }
is not the best solution I guess.


Well, and another problem.
I've created a server socket in a thread. I set blocking to 'true' and now I'm waiting for connections in "accept()". Well, however it's possible that the thread should be closed while it's accepting. How can I cancel that waiting-for-users?




More information about the Digitalmars-d mailing list