Mir

mir:system-executor

Last commit made on 2022-02-01
Get this branch:
git clone -b system-executor https://git.launchpad.net/mir

Branch merges

Branch information

Name:
system-executor
Repository:
lp:mir

Recent commits

de4a53c... by Chris Halse Rogers

Remove BasicThreadPool.

It has a whole bunch of unused features, and the only user has been
migrated to `mir::system_executor`

94fa9b4... by Chris Halse Rogers

mc::MultiThreadedCompositor: Migrate to mir::system_executor.

Use the system threadpool rather than having a dedicated one for the compositor.

67a7145... by Chris Halse Rogers

mir::system_executor: We only need to expose that it's an Executor

5abc945... by Chris Halse Rogers

mir::SystemExecutor: Fix data race on shutdown.

To avoid abandoned Workers trying to `recycle()` themselves into a
now-destroyed ThreadPool we need to wait for all the workers to
quiesce before destroying the ThreadPool.

Since this is just at process exit (or, less usually, when unloading
the library), just loop until the Workers have all finished.

b1ada39... by Chris Halse Rogers

mir::SystemExecutor: Fix off-by-one error in minimum threadpool size.

b5a204c... by Chris Halse Rogers

mir::SystemExectutor: Set the thread name in the right thread.

The test for this appears to be flaky, and will *sometimes* pass
even though the code was clearly incorrect?

fc7e7f6... by Chris Halse Rogers

mir::SystemExecutor: Handle destroying Workers from their own callbacks.

If a Worker is not recycled back into the thread pool then the last reference
to it will be freed when the `std::function<void()> work` is destroyed after
execution in the `work_loop`. Detect this in `~Worker()` and `detach()` rather
than `join()`ing the thread (which would deadlock).

The thread won't touch anything but stack-local memory, and will then
terminate itself.

d97805a... by Chris Halse Rogers

mir::SystemExecutor: Test large numbers of interdependent work items

cd63999... by Chris Halse Rogers

mir::SystemExecutor: Name workqueue threads

2c9b18b... by Chris Halse Rogers

mir::system_executor: Ensure there's just a single symbol.

Instead of one mir::system_executor per code unit that `#include`s
`system_executor.h`. Oops!