Threading changes for the new loop architecture

- threading::Manager is no longer an IOSource.
- threading::MsgThread is now an IOSource. This allows threads themselves to signal when they have data to process instead of continually checking each of the threads on every loop pass.
- Make the thread heartbeat timer an actual timer and let it fire as necessary instead of checking to see if it should fire
This commit is contained in:
Tim Wojtulewicz 2019-11-26 12:54:51 -07:00
parent a159d075cf
commit 8b9160fb7e
6 changed files with 141 additions and 66 deletions

View file

@ -38,8 +38,9 @@ enum TimerType : uint8_t {
TIMER_TRIGGER,
TIMER_PPID_CHECK,
TIMER_TIMERMGR_EXPIRE,
TIMER_THREAD_HEARTBEAT,
};
const int NUM_TIMER_TYPES = int(TIMER_TIMERMGR_EXPIRE) + 1;
const int NUM_TIMER_TYPES = int(TIMER_THREAD_HEARTBEAT) + 1;
extern const char* timer_type_to_string(TimerType type);