mirror of
https://github.com/pocoproject/poco.git
synced 2025-02-27 22:40:59 +01:00
Ability to select the threadpool that will be used to start an Activity.
This commit is contained in:
parent
c59f8865ac
commit
f7e24bf1e4
@ -121,6 +121,11 @@ public:
|
|||||||
void start()
|
void start()
|
||||||
/// Starts the activity by acquiring a
|
/// Starts the activity by acquiring a
|
||||||
/// thread for it from the default thread pool.
|
/// thread for it from the default thread pool.
|
||||||
|
{
|
||||||
|
start(ThreadPool::defaultPool());
|
||||||
|
}
|
||||||
|
|
||||||
|
void start(ThreadPool& pool)
|
||||||
{
|
{
|
||||||
FastMutex::ScopedLock lock(_mutex);
|
FastMutex::ScopedLock lock(_mutex);
|
||||||
|
|
||||||
@ -131,7 +136,7 @@ public:
|
|||||||
_running = true;
|
_running = true;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ThreadPool::defaultPool().start(*this);
|
pool.start(*this);
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user