MCPcopy Create free account
hub / github.com/Vhonowslend/StreamFX-Public / run

Method run

source/util/util-threadpool.cpp:42–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40streamfx::util::threadpool::task::~task() {}
41
42void streamfx::util::threadpool::task::run()
43{
44 std::lock_guard<std::mutex> lg(_lock);
45 if (!_cancelled) {
46 try {
47 _callback(_data);
48 } catch (const std::exception& ex) {
49 D_LOG_ERROR("Unhandled exception in Task: %s.", ex.what());
50 _failed = false;
51 } catch (...) {
52 D_LOG_ERROR("Unhandled exception in Task.", nullptr);
53 _failed = true;
54 }
55 }
56 _completed = true;
57 _status_changed.notify_all();
58}
59
60void streamfx::util::threadpool::task::cancel()
61{

Callers 1

workMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected