You have been subscribed to a public bug: Mir clients may not be aware, but the callbacks made by libmirclient are not thread safe in any way.
An apparently simple single-threaded Mir client has 3 threads, which can execute concurrently: 1. The "main" thread, where the initial connection was made. 2. The socket thread, where the protocol is handled (mir_connected_callback, mir_surface_callback, MirSurfaceEvent) 3. The input thread, where input events are received (MirMotionEvent, MirKeyEvent) Yes, you could receive a MirSurfaceEvent and MirMotionEvent simultaneously in different threads. Neither of which are the main thread. This is how a Mir client works. Unfortunately the existence of these threads is not yet documented. I will update the docs. But this bug is really about finding a way to make the client API more thread safe for simple toolkits and clients that normally don't care about threads. UPDATE: Client API docs improved in r789. To make matters worse, the client API functions are generally not thread safe either: mir_surface_* mir_connection_*. So libmirclient forces you to run in multiple threads and yet doesn't protect you at all against races and corruption that could arise from calling libmirclient from varying threads. UPDATE: Fixed in r827 ** Affects: mir Importance: High Status: Triaged ** Affects: xorg-server (Ubuntu) Importance: Wishlist Status: Confirmed ** Tags: clientapi input qa-touch -- Mir client callbacks are not thread-safe https://bugs.launchpad.net/bugs/1194384 You received this bug notification because you are a member of Ubuntu-X, which is subscribed to xorg-server in Ubuntu. _______________________________________________ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp