Skip to content

Thread pool API redesign and a work stealing thread pool added

Mikel Irazabal requested to merge tp_poc_4 into develop

The API has been changed so that new thread pools can be integrated in the future. It now consists on:

  1. init
  2. free
  3. async (basically send a task to the thread pool)

The join functionality has been decoupled from the main thread pool. The most rated C thread pool from github has been added for testing purposes.

The thread pool is selected at compile time to pass as much information as possible to the compiler.

Additionaly, a new work stealing thread pool is added. Theoretically and practically, using test programs, it scales well, even for small tasks of scores of microseconds.

When testing nr_ulsim, the noise level does not let notice any real difference in a my CPU with 4 cores. Need to test it in larger machines.

Edited by Mikel Irazabal

Merge request reports