Module: Fraggle
- Defined in:
- lib/fraggle-synchrony/fraggle.rb,
lib/fraggle-synchrony/version.rb,
lib/fraggle-synchrony/fraggle/client.rb
Defined Under Namespace
Modules: Synchrony
Classes: Client
Class Method Summary
collapse
Class Method Details
.aconnect ⇒ Object
4
|
# File 'lib/fraggle-synchrony/fraggle.rb', line 4
alias :aconnect :connect
|
.connect(uri = nil) ⇒ Object
7
8
9
10
11
12
13
14
15
16
17
18
|
# File 'lib/fraggle-synchrony/fraggle.rb', line 7
def self.connect(uri = nil)
f = Fiber.current
cb = proc { |client, err|
f.resume client || err
}
self.aconnect(uri, &cb)
response = Fiber.yield
raise response if response.is_a?(StandardError)
response
end
|