igrigorik/em-synchrony — Issue #74: Does the connection_pool determine when a method is async properly?
Author: qqshfox
Created: 2011-10-26 14:54:03+00:00
State: open

https://github.com/igrigorik/em-synchrony/blob/master/lib/em-synchrony/connection_pool.rb#L66

If my client has a method 'add', it will be treated as a 'async' method. This might be not as we expected.

```ruby
it "should treat add alike method as sync" do
class Client
def add
end
end

pool = EM::Synchrony::ConnectionPool.new :size => 1 do
Client.new
end

EM.run do
EM.synchrony do
pool.add

EM.stop
end
end
end
```

Have we a better way to do this? Can we use the result returned by the method which we called?