Re: "waking up" a thread

2009-08-13 Thread Steven Schveighoffer
On Thu, 13 Aug 2009 02:59:39 -0400, funog wrote: Steven Schveighoffer Wrote: On Wed, 12 Aug 2009 13:00:22 -0400, funog wrote: > Is there a way to make the current thread sleep for a given amount of > time, while having the possibility of another thread "waking it up" > earlier? Create a mu

Re: "waking up" a thread

2009-08-13 Thread funog
Steven Schveighoffer Wrote: > On Wed, 12 Aug 2009 13:00:22 -0400, funog wrote: > > > Is there a way to make the current thread sleep for a given amount of > > time, while having the possibility of another thread "waking it up" > > earlier? > > Create a mutex/condition pair, then have one th

Re: "waking up" a thread

2009-08-12 Thread Steven Schveighoffer
On Wed, 12 Aug 2009 13:00:22 -0400, funog wrote: Is there a way to make the current thread sleep for a given amount of time, while having the possibility of another thread "waking it up" earlier? Create a mutex/condition pair, then have one thread wait on the condition with a timeout.

"waking up" a thread

2009-08-12 Thread funog
Is there a way to make the current thread sleep for a given amount of time, while having the possibility of another thread "waking it up" earlier?