Skip to content

v1.2 Wait functions now relinquish CPU resources when idle, and breaking change to ProfilerCallbacks

Compare
Choose a tag to compare
@dougbinks dougbinks released this 20 Oct 09:53
· 280 commits to master since this release

The wait functions now relinquish CPU resources when idle, so other threads can run, similar to the behaviour of task threads which have no tasks to run. This lowers CPU power consumption, and can improve performance when the CPU is oversubscribed (for example when other threads or processes are consuming resources). Thanks to @zhaijialong for the feature request and follow up testing. See issue #31 for more information.

The wait functions try to run tasks whilst waiting, and if there are none they first spin then perform an OS blocking wait for a task complete event allowing other threads to run. The task complete event system may spuriously wake waiting threads, but they will then go back to a blocking wait.

This update also has a breaking change to the ProfilerCallbacks struct, which should be a one or two line change. Please see the struct declaration and comments for details.

Finally, in addition to a few bug fixes, this release also deprecates the C++98 branches and support for non C++11 compatible compilers (C support is still available through the C headers).