1 # -*- encoding: binary -*-
6 # Actor concurrency model for Rubinius. We can't seem to get message
7 # passing working right, so we're throwing a Mutex into the mix for
8 # now. Hopefully somebody can fix things for us. Currently, this is
9 # exactly the same as the ThreadSpawn model since we don't use the
10 # message passing capabilities of the Actor model (and even then
11 # it wouldn't really make sense since Actors in Rubinius are just
12 # Threads underneath and our ThreadSpawn model is one layer of
15 # This is different from the Revactor one which is not prone to race
16 # conditions within the same process at all (since it uses Fibers).
20 # runs inside each forked worker, this sits around and waits
21 # for connections and doesn't die until the parent dies (or is
22 # given a INT, QUIT, or TERM signal)
23 def worker_loop(worker) # :nodoc:
24 Const::RACK_DEFAULTS["rack.multithread"] = true # :(
25 init_worker_process(worker)