<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - wl_display_dispatch(_queue) documentation about thread safeness is probably wrong"
href="https://bugs.freedesktop.org/show_bug.cgi?id=91767#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - wl_display_dispatch(_queue) documentation about thread safeness is probably wrong"
href="https://bugs.freedesktop.org/show_bug.cgi?id=91767">bug 91767</a>
from <span class="vcard"><a class="email" href="mailto:jadahl@gmail.com" title="Jonas Ådahl <jadahl@gmail.com>"> <span class="fn">Jonas Ådahl</span></a>
</span></b>
<pre>(In reply to Marek Chalupa from <a href="show_bug.cgi?id=91767#c3">comment #3</a>)
<span class="quote">> > If you call prepare + poll + read in thread A and
> > wl_display_dispatch_queue() in another thread B (dispatching two different
> > queues), the fd could become readable before wl_display_dispatch_queue()
> > calls poll
> > (<a href="http://cgit.freedesktop.org/wayland/wayland/tree/src/wayland-client">http://cgit.freedesktop.org/wayland/wayland/tree/src/wayland-client</a>.
> > c#n1574) and whole prepare+read sequence could run before it, queing events
> > into both queues. After prepare+read queued events, thread B goes to sleep
> > in poll with events hanging in the queue.
>
> Oh, wait, dispatching queue and increasing reader_count is atomical in
> wl_display_dispatch_queue(), so the thread A should not events, so it should
> probably work</span >
Exactly. So mixing them is fine, as long as you don't call dispatch() between
prepare() and cancel()/read() calls.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>