Closed Bug 1471246 Opened 5 years ago Closed 2 years ago
[Wayland] Use wl
_proxy _wrapper() to create thread safe objects
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.
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.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.