Re: How to stop the Threadmill

2013-01-29 Thread Steven Schveighoffer
On Mon, 28 Jan 2013 05:18:26 -0500, Chris wrote: I am sure this has been asked before, but I couldn't find a solution or a hint via Google: I use a separate thread to play a sound file. Everything works fine, except that I cannot tell the thread to stop what it is doing. It refuses to rece

Re: How to stop the Threadmill

2013-01-28 Thread Chris
Thanks guys. I can get the functionality I need by simply using a shared flag that breaks out of the play loop if set to false. I thought it might be possible to implement the stop function by sending a message to the thread assuming that the thread "listens" to receive *while* executing its ta

Re: How to stop the Threadmill

2013-01-28 Thread Dicebot
On Monday, 28 January 2013 at 10:18:27 UTC, Chris wrote: I am sure this has been asked before, but I couldn't find a solution or a hint via Google: I use a separate thread to play a sound file. Everything works fine, except that I cannot tell the thread to stop what it is doing. It refuses to r

Re: How to stop the Threadmill

2013-01-28 Thread qznc
On Monday, 28 January 2013 at 10:18:27 UTC, Chris wrote: I am sure this has been asked before, but I couldn't find a solution or a hint via Google: I use a separate thread to play a sound file. Everything works fine, except that I cannot tell the thread to stop what it is doing. It refuses to r

How to stop the Threadmill

2013-01-28 Thread Chris
I am sure this has been asked before, but I couldn't find a solution or a hint via Google: I use a separate thread to play a sound file. Everything works fine, except that I cannot tell the thread to stop what it is doing. It refuses to receive messages while it is doing what it's doing (even i