bkeepers / qu

a Ruby library for queuing and processing background jobs.
MIT License
505 stars 50 forks source link

Use Queue in memory backend #92

Closed grantr closed 9 years ago

grantr commented 9 years ago

Not sure if this is an improvement or not, but it was easy to try. Popping an empty queue now requires exception handling, so there might be a performance degradation. If so it's probably not worth the change.

bkeepers commented 9 years ago

Is thread-safety the primary motivation for this?

grantr commented 9 years ago

Thread safety is the only motivation for this. I can't imagine it will be faster. If you're confident in the current thread-safe-ness, I don't see a good reason to merge.

Starting to seem like a worse idea all the time! :wink:

bkeepers commented 9 years ago

Looks like the code already uses a Monitor, which should make it threadsafe.

bkeepers commented 9 years ago

oops, didn't mean to close.

grantr commented 9 years ago

Monitor should be fine.