Same code. Different behavior.

Swap the server, not the application

def wait(timeout: TIMEOUT)
  # 🏊 Release DB connection to keep the pool free
  ActiveRecord::Base.connection_pool
    .release_connection

  # 🐌 Puma:  blocks the THREAD (expensive)
  # 🦅 Falcon: suspends the FIBER (free)
  channel.pop(timeout:)

  self
end
26 / 45