Rainbows! Rack HTTP server user/dev discussion
 help / color / Atom feed
9bc7b503de49d20b0d0ca8d49d557f26c8f29c5f blob 782 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 
# -*- encoding: binary -*-

module Rainbows::EventMachineThreadPool
  autoload :Client, 'rainbows/event_machine_thread_pool/client'
  extend  Rainbows::PoolSize
  include Rainbows::EventMachine

  def init_worker_threads(queue) # :nodoc:
    Rainbows::O[:pool_size].times.map do
      Thread.new do
        begin
          client = queue.pop
          response = client.app_response
          EM.next_tick { client.response_write(response) }
        rescue => e
          Rainbows::Error.listen_loop(e)
        end while Rainbows.alive
      end
    end
  end

  def init_worker_process(worker)
    queue = Client.const_set(:QUEUE, Queue.new)
    threads = init_worker_threads(queue)
    logger.info "EventMachineThreadPool pool_size=#{Rainbows::O[:pool_size]}"
    super
  end
end
debug log:

solving 9bc7b50 ...
found 9bc7b50 in http://bogomips.org/rainbows-public/1379421104-75563-1-git-send-email-godfat@godfat.org/

applying [1/1] http://bogomips.org/rainbows-public/1379421104-75563-1-git-send-email-godfat@godfat.org/
diff --git a/lib/rainbows/event_machine_thread_pool.rb b/lib/rainbows/event_machine_thread_pool.rb
new file mode 100644
index 0000000..9bc7b50

Checking patch lib/rainbows/event_machine_thread_pool.rb...
Applied patch lib/rainbows/event_machine_thread_pool.rb cleanly.

index at:
100644 9bc7b503de49d20b0d0ca8d49d557f26c8f29c5f	lib/rainbows/event_machine_thread_pool.rb

Rainbows! Rack HTTP server user/dev discussion

Archives are clonable:
	git clone --mirror http://bogomips.org/rainbows-public
	git clone --mirror http://ou63pmih66umazou.onion/rainbows-public

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.rainbows
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.rainbows

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git