Rethinking MirWaitHandle

Daniel van Vugt daniel.van.vugt at canonical.com
Thu Mar 13 02:10:49 UTC 2014


Yes, it's totally a mis-feature of MirWaitHandle but one we need right 
now. I think it might be that way because single-threaded clients 
actually are not single threaded (bug 1194384).

I don't think we should be asking single threaded clients to use 
explicit cross-thread synchronization. I think we should solve bug 
1194384 first.


On 13/03/14 10:00, Christopher James Halse Rogers wrote:
> On Thu, Mar 13, 2014 at 9:54 AM, Daniel van Vugt
> <daniel.van.vugt at canonical.com> wrote:
>> You know it's a feature of MirWaitHandle that multiple threads can and
>> do wait on the same handle? We rely on this feature; I forget where.
>>
>> But that means your actual wait call can't free the wait object. More
>> wait calls can and will come along and use it later (from different
>> threads even).
>
> That seems like a mis-feature of MirWaitHandle, really. If people want
> to do cross-thread synchronisation they should probably use thread
> synchronisation primitives rather than rely on MirWaitHandle doing
> double duty.
>



More information about the Mir-devel mailing list