diff options
| -rw-r--r-- | ioriot/src/replay/rthread.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ioriot/src/replay/rthread.c b/ioriot/src/replay/rthread.c index ae0a597..6bbf4f9 100644 --- a/ioriot/src/replay/rthread.c +++ b/ioriot/src/replay/rthread.c @@ -121,6 +121,10 @@ void *rthread_pthread_start(void *data) // Make the rthread reusable, he is without any tasks // for some time. pthread_mutex_lock(&w->rthread_buffer_mutex); + if (rbuffer_has_next(t->tasks)) { + pthread_mutex_unlock(&w->rthread_buffer_mutex); + break; + } inserted = rbuffer_insert(w->rthread_buffer, t); pthread_mutex_unlock(&w->rthread_buffer_mutex); } |
