Files
openairinterface5g/common/utils/actor
21dafbcde7 New threadpool
- removed some whitespace noise.
 - cleaned up CMakeLists.txt
 - reintegrated task_manager.c into thread-pool.c
 - cleaned up some unnecessary code

Co-authored-by: Cedric Roux <cedric.roux@eurecom.fr>
Co-authored-by: Mikel Irazabal <mikel.irazabal@openairinterface.com>
2024-12-04 17:54:51 +01:00
..
2024-11-27 18:15:24 +01:00
2024-11-27 18:15:24 +01:00
2024-12-04 17:54:51 +01:00
2024-11-27 18:15:24 +01:00
2024-11-27 18:15:24 +01:00

Overview

This is a simple actor implementation (see https://en.wikipedia.org/wiki/Actor_model).

Actor is implemented as a single thread with single producer/consumer queue as input. You can think of it as a single thread threadpool

If you need concurrency, consider allocating more than one actor.

Thread safety

There is two ways to ensure thread safety between two actors

  • Use core affinity to set both actor to run on the same core.
  • Use data separation, like in testcase thread_safety_with_actor_specific_data