Re: Using of core.sync.condition.Condition

2011-10-26 Thread Alexander
On 24.10.2011 16:12, Steven Schveighoffer wrote: The key here is, waiting on a condition atomically unlocks the mutex. If waiting on a condition was allowed without locking the mutex, potentially thread2 could miss thread1's signal, and you encounter a deadlock! OK, thanks. For ages I

Re: Using of core.sync.condition.Condition

2011-10-24 Thread Steven Schveighoffer
On Fri, 21 Oct 2011 14:32:15 -0400, Alexander aldem+dm...@nk7.net wrote: Hi, I've the code (see below) which produces an exception (SyncException Unable to wait for condition) unless synchronized is used when waiting on condition (Fedora Linux, 32 bit, DMD 2.055). Do I do something

Re: Using of core.sync.condition.Condition

2011-10-24 Thread Sean Kelly
On Oct 24, 2011, at 7:12 AM, Steven Schveighoffer wrote: When waiting on a condition, you must have its associative mutex locked, or Bad Things could happen. You should also have the mutex locked when signaling the condition, but I don't think that's an absolute requirement. The key

Using of core.sync.condition.Condition

2011-10-21 Thread Alexander
Hi, I've the code (see below) which produces an exception (SyncException Unable to wait for condition) unless synchronized is used when waiting on condition (Fedora Linux, 32 bit, DMD 2.055). Do I do something wrong? Using synchronized when accessing anything that is synchronization object