rainbows.git  about / heads / tags
Unicorn for sleepy apps and slow clients
blob 844651a98ae8e9bb670d28a7c19133745ebe6931 953 bytes (raw)
$ git show HEAD:lib/rainbows/rev_thread_pool.rb	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
 
# -*- encoding: binary -*-
# :stopdoc:
Rainbows.const_set(:RevThreadPool, Rainbows::CoolioThreadPool)
# :startdoc:

# CoolioThreadPool is the new version of this, use that instead.
#
# A combination of the Rev and ThreadPool models.  This allows Ruby
# Thread-based concurrency for application processing.  It DOES NOT
# expose a streamable "rack.input" for upload processing within the
# app.  DevFdResponse should be used with this class to proxy
# asynchronous responses.  All network I/O between the client and
# server are handled by the main thread and outside of the core
# application dispatch.
#
# Unlike ThreadPool, Rev makes this model highly suitable for
# slow clients and applications with medium-to-slow response times
# (I/O bound), but less suitable for sleepy applications.
#
# This concurrency model is designed for Ruby 1.9, and Ruby 1.8
# users are NOT advised to use this due to high CPU usage.
module Rainbows::RevThreadPool; end

git clone https://yhbt.net/rainbows.git