summaryrefslogtreecommitdiffstats
path: root/tests-build
diff options
context:
space:
mode:
authorJon Gjengset <jon@thesquareplanet.com>2019-10-24 17:17:47 -0400
committerCarl Lerche <me@carllerche.com>2019-10-24 14:17:47 -0700
commit03a9378297c73c2e56a6d6b55db22b92427b850a (patch)
tree82b1612c4592d5098f42d74405c0d5b01c51c972 /tests-build
parent99940aeeb478e1c96959aed69561336ab067d0d3 (diff)
Make blocking pool non-static and use for thread pool (#1678)
Previously, support for `blocking` was done through a static `POOL` that would spawn threads on demand. While this made the pool accessible at all times, it made it hard to configure, and it was impossible to keep multiple blocking pools. This patch changes `blocking` to instead use a "default" global like the ones used for timers, executors, and the like. There is now `blocking::with_pool`, which is used by both thread-pool workers and the current-thread runtime to ensure that a pool is available to tasks. This patch also changes `ThreadPool` to spawn its worker threads on the blocking pool rather than as free-standing threads. This is in preparation for the coming in-place blocking work. One downside of this change is that thread names are no longer "semantic". All threads are named by the pool name, and individual threads are not (currently) given names with numerical suffixes like before.
Diffstat (limited to 'tests-build')
0 files changed, 0 insertions, 0 deletions