Skip to content
Browse files

Ability to select the threadpool that will be used to start an Activity.

  • Loading branch information...
1 parent c59f886 commit f7e24bf1e41391c647a819a977823ae06a6b023a @ptarabbia committed May 23, 2013
Showing with 6 additions and 1 deletion.
  1. +6 −1 Foundation/include/Poco/Activity.h
View
7 Foundation/include/Poco/Activity.h
@@ -122,6 +122,11 @@ class Activity: public Runnable
/// Starts the activity by acquiring a
/// thread for it from the default thread pool.
{
+ start(ThreadPool::defaultPool());
+ }
+
+ void start(ThreadPool& pool)
+ {
FastMutex::ScopedLock lock(_mutex);
if (!_running)
@@ -131,7 +136,7 @@ class Activity: public Runnable
_running = true;
try
{
- ThreadPool::defaultPool().start(*this);
+ pool.start(*this);
}
catch (...)
{

0 comments on commit f7e24bf

Please sign in to comment.
Something went wrong with that request. Please try again.