MCPcopy Create free account
hub / github.com/Niko1221/Strata / post

Method post

engine/sycl/src/program/generate.cpp:1445–1453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1443 JobThread(const JobThread&) = delete;
1444 JobThread& operator=(const JobThread&) = delete;
1445 void post(std::function<void()> f) {
1446 {
1447 std::lock_guard<std::mutex> lk(mu_);
1448 job_ = std::move(f);
1449 has_ = true;
1450 done_.store(false, std::memory_order_release);
1451 }
1452 cv_.notify_one();
1453 }
1454 bool idle() const { return done_.load(std::memory_order_acquire); }
1455 void wait() const { while (!idle()) std::this_thread::yield(); }
1456private:

Callers 4

mainFunction · 0.45
sendFunction · 0.45
exerciseFunction · 0.45
mainFunction · 0.45

Calls 2

moveFunction · 0.85
storeMethod · 0.45

Tested by 3

sendFunction · 0.36
exerciseFunction · 0.36
mainFunction · 0.36