class Concurrent::SerializedExecution
def work(job)
def work(job) job.call ensure synchronize do job = @stash.shift || (@being_executed = false) end # TODO maybe be able to tell caching pool to just enqueue this job, because the current one end at the end # of this block call_job job if job end