lockstep_scheduler: optimize performance
- use a linked-list instead of std::vector. Insertion and removal are now O(1) - avoid malloc and use a thread_local instance of TimedWait. It gets destroyed when the thread exits, so we have to add protection in case a thread exits too quickly. This in turn requires a fix to the unit-tests.
Showing
- platforms/posix/src/lockstep_scheduler/CMakeLists.txt 2 additions, 0 deletionsplatforms/posix/src/lockstep_scheduler/CMakeLists.txt
- platforms/posix/src/lockstep_scheduler/include/lockstep_scheduler/lockstep_scheduler.h 19 additions, 2 deletions...scheduler/include/lockstep_scheduler/lockstep_scheduler.h
- platforms/posix/src/lockstep_scheduler/src/lockstep_scheduler.cpp 51 additions, 22 deletions...s/posix/src/lockstep_scheduler/src/lockstep_scheduler.cpp
- platforms/posix/src/lockstep_scheduler/test/src/lockstep_scheduler_test.cpp 46 additions, 10 deletions...c/lockstep_scheduler/test/src/lockstep_scheduler_test.cpp
Please register or sign in to comment