julman99/beanstalkd — comment on commit 70cc4da876395d2d7fc3c1aa875a08f53c30b50a
File:  line 0
By kr:

This approach is fine unless there are many jobs in the tube,
in which case it will block beanstalkd from serving any other
clients while freeing the jobs.

Instead, tube_clear should put the Heap structs onto a list of
trash and reset the tube struct. Then the main event handler
should incrementally free jobs from the Heaps in the trash.