Closed
Bug 1471246
Opened 6 years ago
Closed 4 years ago
[Wayland] Use wl_proxy_wrapper() to create thread safe objects
Categories
(Core :: Widget: Gtk, enhancement)
Core
Widget: Gtk
Tracking
()
RESOLVED
WORKSFORME
Tracking | Status | |
---|---|---|
firefox63 | --- | affected |
People
(Reporter: stransky, Unassigned)
References
(Blocks 1 open bug)
Details
According to Jonas Adahl we should use wl_proxy_wrapper() to create thread safe objects:
Lets say you want to create an object and set a special queue on it. To
make that thread safe, you need to create a proxy object for the
*parent* of that object.
> I'm looking at the Mesa sources (elg/drivers/dri2/platform_wayland.c) how
> Mesa handles it.
[...]
It only matters whether you use the wrapper object or not when creating
new Wayland objects which you need to listen to events on. Mesa might be
using dri2_dpy->wl_dpy directly for things that doesn't create objects
and thus doesn't care about event loops.
Comment 1•6 years ago
|
||
Note that you need to set the event loop on the proxy object before using it to create new objects to make the usage thread safe. See the proxy object documentation in libwayland-client.
Reporter | ||
Comment 2•4 years ago
|
||
We should be safe now.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•