Prevent race condition when sync req received

Added a flush mechanism to actor thread. This is used to wait for all
waiting jobs in the queue to be completed.
This commit is contained in:
Sakthivel Velumani
2024-12-10 09:51:10 -05:00
parent e5814cd62e
commit 73921dfa10
3 changed files with 26 additions and 2 deletions
+5
View File
@@ -49,4 +49,9 @@ void destroy_actor(Actor_t *actor);
/// @param actor
void shutdown_actor(Actor_t *actor);
/// @brief This function will return when all current jobs in the queue are finished.
/// The caller should make sure no new jobs are added to the queue between this function call and return.
/// @param actor
void flush_actor(Actor_t *actor);
#endif