Skip to content

Commit 085bdc4

Browse files
committed
Sleep until monitor thread sleeps
pass thread execution until monitor thread send heartbeat (or wait while current alive time is available) and sleep for next heartbeat.
1 parent 7d9d66a commit 085bdc4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/perfectqueue/task_monitor.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def set_task(task, runner)
6060
@mutex.synchronize {
6161
@task = task
6262
@last_task_heartbeat = @task.timeout.to_i
63+
Thread.pass until @thread.stop? if @thread
6364
}
6465
end
6566

0 commit comments

Comments
 (0)