diff options
Diffstat (limited to 'mysys/thr_alarm.c')
-rw-r--r-- | mysys/thr_alarm.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mysys/thr_alarm.c b/mysys/thr_alarm.c index 5d2ac8b0099..36bbac16fef 100644 --- a/mysys/thr_alarm.c +++ b/mysys/thr_alarm.c @@ -120,16 +120,20 @@ void init_thr_alarm(uint max_alarms) DBUG_VOID_RETURN; } + void resize_thr_alarm(uint max_alarms) { pthread_mutex_lock(&LOCK_alarm); - /* it's ok not to shrink the queue sometimes */ + /* + It's ok not to shrink the queue as there may be more pending alarms than + than max_alarms + */ if (alarm_queue.elements < max_alarms) resize_queue(&alarm_queue,max_alarms+1); pthread_mutex_unlock(&LOCK_alarm); - return; } + /* Request alarm after sec seconds. |