Document client threading and event queues
Submitted by Pekka Paalanen
Assigned to Wayland bug list
Description
Write a chapter to the "big docs" about client side threading and event queues.
- dispatching a queue from more than one thread is a bad idea; explain why
- therefore, every thread that needs to dispatch should have its own queue
- also every piece of software that needs to dispatch in a controlled context needs its own queue (e.g. libEGL)
- the client API is not multi-thread-dispatch-safe (wl_display_roundtrip)
- a new wl_proxy inherits its factory's queue
- destroying a queue while wl_proxies on it exist is a mistake and may lead to use-after-free when events on that wl_proxy arrive
- wl_display contains the default queue