Rainbows! Rack HTTP server user/dev discussion
 help / color / Atom feed
8738cae11cc23ddd9e81befda63d6af91b1c283d blob 706 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
 
# -*- encoding: binary -*-
# :enddoc:
require 'thread'
class Rainbows::SyncClose
  def initialize(body)
    @body = body
    @mutex = Mutex.new
    @cv = ConditionVariable.new
    @mutex.synchronize do
      yield self
      @cv.wait(@mutex)
    end
  end

  def respond_to?(m)
    @body.respond_to?(m)
  end

  def readpartial(*args)
    @body.readpartial(*args)
  end

  def read(*args)
    @body.read(*args)
  end

  def to_path
    @body.to_path
  end

  def each
    @body.each { |x| yield x }
  end

  def to_io
    @body.to_io
  end

  # called by the writer thread to wake up the original thread (in #initialize)
  def close
    @body.close
  ensure
    @mutex.synchronize { @cv.signal }
  end
end
debug log:

solving 8738cae ...
found 8738cae in https://bogomips.org/rainbows.git

Rainbows! Rack HTTP server user/dev discussion

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

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