Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ MT-multithreading and servers » how to stop a thread that is waiting, e.g., listen()
Re: how to stop a thread that is waiting, e.g., listen() [message #11853 is a reply to message #11802] Fri, 28 September 2007 05:13 Go to previous messageGo to previous message
bonami is currently offline  bonami
Messages: 186
Registered: June 2007
Location: Beijing
Experienced Member
MS way IS what i want.
here's my plan to implement and hope to get some advice from ya,

in the main window thread, create a thread.
in the 2nd thread, open a network socket.
in the 1st thread, when it needs to tell sth. to or shut down the other thread, SetEvent.
in the 2nd thread, WaitForMultipleObjects on both the network socket and the event from the 1st thread.

pretty much like write() and select() on POSIX. how's this? thank you so much.
 
Read Message icon11.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon5.gif
Read Message
Read Message icon9.gif
Read Message
Read Message
Read Message
Read Message icon11.gif
Read Message
Read Message
Previous Topic: GuiMT example does not calculate all divisors...
Next Topic: will implement a UDP class?
Goto Forum:
  


Current Time: Tue May 14 11:11:59 CEST 2024

Total time taken to generate the page: 0.02561 seconds