diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-10-13 13:12:42 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-10-13 13:12:42 +0200 |
commit | 5eaf803e6bbf278976f18a44db60ce0cba5edc75 (patch) | |
tree | 700c06949cafdf405852097ba23d2e6910d3ee49 /staging_vespalib | |
parent | 53202e7781276eadd2a4bed3b26eb1586bf85725 (diff) |
You can only start threads that operates on this in the constructor if you are final.
Diffstat (limited to 'staging_vespalib')
-rw-r--r-- | staging_vespalib/src/vespa/vespalib/util/document_runnable.cpp | 4 | ||||
-rw-r--r-- | staging_vespalib/src/vespa/vespalib/util/document_runnable.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/staging_vespalib/src/vespa/vespalib/util/document_runnable.cpp b/staging_vespalib/src/vespa/vespalib/util/document_runnable.cpp index 86f361ea1fe..02d8a15b300 100644 --- a/staging_vespalib/src/vespa/vespalib/util/document_runnable.cpp +++ b/staging_vespalib/src/vespa/vespalib/util/document_runnable.cpp @@ -5,11 +5,11 @@ namespace document { -Runnable::Runnable(FastOS_ThreadPool* pool) +Runnable::Runnable() : _stateLock(), _state(NOT_RUNNING) { - if (pool) start(*pool); + // if (pool) start(*pool); } Runnable::~Runnable() { diff --git a/staging_vespalib/src/vespa/vespalib/util/document_runnable.h b/staging_vespalib/src/vespa/vespalib/util/document_runnable.h index ec2c10d1f6e..60a67189b5b 100644 --- a/staging_vespalib/src/vespa/vespalib/util/document_runnable.h +++ b/staging_vespalib/src/vespa/vespalib/util/document_runnable.h @@ -42,7 +42,7 @@ public: * Create a runnable. * @param pool If set, runnable will be started in constructor. */ - Runnable(FastOS_ThreadPool* pool = nullptr); + Runnable(); ~Runnable(); /** |