brandonhilkert / sucker_punch

Sucker Punch is a Ruby asynchronous processing library using concurrent-ruby, heavily influenced by Sidekiq and girl_friday.
MIT License
2.65k stars 114 forks source link

Include Sinatra specific instructions. #211

Closed richardkmichael closed 6 years ago

richardkmichael commented 6 years ago

Sinatra starts itself up in an at_exit() handler. Ruby runs multiple at_exit() handlers in reverse order of registration. Sucker Punch does clean up and shutdown in an at_exit() handler. Hence, if SuckerPunch is required after Sinatra, Sucker Punch will shut itself down just prior to Sinatra starting up.

This is a bit surprising, so mention it in the docs.