<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED DUPLICATE - Wayland may have interface bug when multi-threads programing."
href="https://bugs.freedesktop.org/show_bug.cgi?id=91750#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED DUPLICATE - Wayland may have interface bug when multi-threads programing."
href="https://bugs.freedesktop.org/show_bug.cgi?id=91750">bug 91750</a>
from <span class="vcard"><a class="email" href="mailto:syjman@gmail.com" title="Yujie Shen <syjman@gmail.com>"> <span class="fn">Yujie Shen</span></a>
</span></b>
<pre>(In reply to Jonas Ã…dahl from <a href="show_bug.cgi?id=91750#c2">comment #2</a>)
<span class="quote">> Hi and thanks for the report. This seems to be a duplicate of <a class="bz_bug_link
bz_status_NEW "
title="NEW - It's not safe to share wl_display fd with other threads."
href="show_bug.cgi?id=91273">bug 91273</a>, so
> closing this one. The problem can be worked around by using the current API
> to block dispatching on other threads (see the last paragraph of (omment 2
> of <a class="bz_bug_link
bz_status_NEW "
title="NEW - It's not safe to share wl_display fd with other threads."
href="show_bug.cgi?id=91273">bug 91273</a> <<a class="bz_bug_link
bz_status_NEW "
title="NEW - It's not safe to share wl_display fd with other threads."
href="show_bug.cgi?id=91273#c2">https://bugs.freedesktop.org/show_bug.cgi?id=91273#c2</a>>. You
> will need this until we decide what API we want to introduce fix the issue
> properly.
>
> *** This bug has been marked as a duplicate of <a class="bz_bug_link
bz_status_NEW "
title="NEW - It's not safe to share wl_display fd with other threads."
href="show_bug.cgi?id=91273">bug 91273</a> ***</span >
Thank you.
But,this bug is totally different from <a class="bz_bug_link
bz_status_NEW "
title="NEW - It's not safe to share wl_display fd with other threads."
href="show_bug.cgi?id=91273">bug 91273</a>.
<a class="bz_bug_link
bz_status_NEW "
title="NEW - It's not safe to share wl_display fd with other threads."
href="show_bug.cgi?id=91273">Bug 91273</a> reports a bug that 2 threads polling on same display fd in both
threads.
My bug,namely <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED DUPLICATE - Wayland may have interface bug when multi-threads programing."
href="show_bug.cgi?id=91750">Bug 91750</a>,reports a bug that a wl_proxy's property is still being
modifying in a thread,while another thread may have sent it to server.
Please kindly check the attachment"wayland multi-threads interface bug"again.
Here is a piece of code to reappear the bug.
int
main(int argc, char **argv)
{
..
//sub-thread
pthread_t id;
pthread_create(&id, NULL, wl_display_roundtrip, &wl_display);
...
//main_thread
while (1) {
...
wl_surface_attach();
window->callback = wl_surface_frame(window->surface);
//surface_frame.callback event may have been sent and dispatched by
wl_display_roundtrip in sub-thread,before wl_proxy_set_queue in main_thread.
wl_proxy_set_queue(window->callback,queue2);
wl_callback_add_listener(window->callback, &frame_listener, window);
wl_surface_commit(window->surface);
}
...
return 0;
}</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>