MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / decrease

Method decrease

modules/core/task/src/task2.cpp:636–649  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

634 }
635
636 bool counter_t::decrease()
637 {
638 SKR_ASSERT(state->count > 0);
639 auto count = --state->count;
640 if(state->inverse)
641 return false;
642 if(count == 0)
643 {
644 SMutexLock guard(state->mutex);
645 state->cv.notify();
646 return true;
647 }
648 return false;
649 }
650
651 void scheduler_t::initialize(const scheudler_config_t & cfg)
652 {

Callers 1

main.cppFile · 0.45

Calls 1

notifyMethod · 0.45

Tested by

no test coverage detected