summaryrefslogtreecommitdiffstats
path: root/common/modelresult.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-06-19 19:23:56 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-06-19 19:23:56 +0200
commit8f06f8a31682760b385ba740db28429d7914730a (patch)
tree85e83037d358f451bf353349ef14e87575221d58 /common/modelresult.cpp
parentba16fd400dfd3468e90b9fe2683a4d9606fc99ee (diff)
downloadsink-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.cpp2
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)
253template <class T, class Ptr> 252template <class T, class Ptr>
254void ModelResult<T, Ptr>::setEmitter(const typename Sink::ResultEmitter<Ptr>::Ptr &emitter) 253void 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) {