Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A worker pool is only needed for rpc instances that serve call backs
Since the glib-2.0 patch 4d2e77a55 GThreadPool: Always use the thread-spawning thread for the global shared thread pool GNOME/glib@4d2e77a creating a threadpool spawns a new thread. Previously, this was only the case for non-Linux platforms. This can cause issues for daemons that fork and depend on libraries that load apteryx on LT_INIT, as the glib threadpool spawned thread will not be copied on the fork. Additionally, now libraries that only use get calls will be running an extra thread from the threadpool. Move the threadpool creation into request_cb() to only spawn the pool managing thread for applications that require callbacks using workers.
- Loading branch information