diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-06-19 19:23:56 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-06-19 19:23:56 +0200 |
commit | 8f06f8a31682760b385ba740db28429d7914730a (patch) | |
tree | 85e83037d358f451bf353349ef14e87575221d58 /common/modelresult.cpp | |
parent | ba16fd400dfd3468e90b9fe2683a4d9606fc99ee (diff) | |
download | sink-8f06f8a31682760b385ba740db28429d7914730a.tar.gz sink-8f06f8a31682760b385ba740db28429d7914730a.zip |
Don't use a static for the threadboundary
Otherwise we risk calling into already destroyed models.
Diffstat (limited to 'common/modelresult.cpp')
-rw-r--r-- | common/modelresult.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/common/modelresult.cpp b/common/modelresult.cpp index 9f3e662..3778d4d 100644 --- a/common/modelresult.cpp +++ b/common/modelresult.cpp | |||
@@ -24,7 +24,6 @@ | |||
24 | 24 | ||
25 | #include "domain/folder.h" | 25 | #include "domain/folder.h" |
26 | #include "log.h" | 26 | #include "log.h" |
27 | #include "threadboundary.h" | ||
28 | 27 | ||
29 | #undef DEBUG_AREA | 28 | #undef DEBUG_AREA |
30 | #define DEBUG_AREA "client.modelresult" | 29 | #define DEBUG_AREA "client.modelresult" |
@@ -253,7 +252,6 @@ void ModelResult<T, Ptr>::setFetcher(const std::function<void(const Ptr &parent) | |||
253 | template <class T, class Ptr> | 252 | template <class T, class Ptr> |
254 | void ModelResult<T, Ptr>::setEmitter(const typename Sink::ResultEmitter<Ptr>::Ptr &emitter) | 253 | void ModelResult<T, Ptr>::setEmitter(const typename Sink::ResultEmitter<Ptr>::Ptr &emitter) |
255 | { | 254 | { |
256 | static async::ThreadBoundary threadBoundary; | ||
257 | setFetcher([this](const Ptr &parent) { mEmitter->fetch(parent); }); | 255 | setFetcher([this](const Ptr &parent) { mEmitter->fetch(parent); }); |
258 | 256 | ||
259 | emitter->onAdded([this](const Ptr &value) { | 257 | emitter->onAdded([this](const Ptr &value) { |