fix(modules): Warmup module on start
This commit is contained in:
parent
c2ac7fde67
commit
92cc4d6f40
@ -11,16 +11,15 @@ namespace modules {
|
||||
using module<Impl>::module;
|
||||
|
||||
void start() {
|
||||
CAST_MOD(Impl)->update();
|
||||
CAST_MOD(Impl)->broadcast();
|
||||
|
||||
this->m_mainthread = thread(&event_module::runner, this);
|
||||
}
|
||||
|
||||
protected:
|
||||
void runner() {
|
||||
try {
|
||||
// Warm up the module output before entering the loop
|
||||
CAST_MOD(Impl)->update();
|
||||
CAST_MOD(Impl)->broadcast();
|
||||
|
||||
while (this->running()) {
|
||||
CAST_MOD(Impl)->idle();
|
||||
|
||||
|
@ -13,6 +13,7 @@ namespace modules {
|
||||
using module<Impl>::module;
|
||||
|
||||
void start() {
|
||||
CAST_MOD(Impl)->update();
|
||||
this->m_mainthread = thread(&timer_module::runner, this);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user