Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

does a sleeping thread still handle messages?

Status
Not open for further replies.

bardley

Programmer
Joined
May 8, 2001
Messages
121
Location
US
if a thread with a registered event listener is in its run() method but sleeping, will it still be listening for events? i.e., will it be woken up to handle that event, or will it sleep until it is ready again and THEN get the event, or will it totally miss the event?
Brad Gunsalus
bardley90@hotmail.com
 
sleep() will NOT unblock to handle the event

-pete
 
ok, thanks Brad Gunsalus
bardley90@hotmail.com
 
typically you only sleep to provide a "delay" mechanism, which of course you don't want in your UI.

What are you trying to do?

-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top