Re: Updating the contents of a treemodel from another thread.



Tomasz Olszewski wrote:
> Bartosz Kostrzewa napisał(a):
>> Doh.. I had forgotten to unlock the mutex after a cond_.wait(mutex_);
>>   
> That's exactly why it's better to use a scoped lock (Mutex::Lock in this
> case) instead of locking/unlocking mutex objects directly.
> 

Yes, that's what I did everywhere else but I needed this conditional
wait specifically for waiting until the thread is terminated, simply
creating another lock did not cut it unfortunately because of the
asynchronity. (the lock was created before the thread started terminating)

-Bartek



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]