1 # -*- encoding: binary -*-
3 # This module only gets loaded on shutdown
4 module Rainbows::JoinThreads
6 # blocking acceptor threads must be forced to run
7 def self.acceptors(threads)
8 expire = Rainbows.now + Rainbows.server.timeout
9 threads.delete_if do |thr|
12 # blocking accept() may not wake up properly
13 thr.raise(Errno::EINTR) if Rainbows.now > expire && thr.stop?
20 end until threads.empty?