Improved queue processing
Prevent `put()` from blocking when the scanner is running