Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Adding to multi with the same id will block a call to perform #86

Closed
joshdevins opened this Issue Nov 24, 2011 · 2 comments

Comments

Projects
None yet
2 participants

For example, the following will block on the multi.perform call:

multi = EventMachine::Synchrony::Multi.new

multi.add(:shared_id, EM::HttpRequest.new("http://google.com")))
multi.add(:shared_id, EM::HttpRequest.new("http://yahoo.com"))

deferred = multi.perform

Have not tried calling the iterators but I presume the effect will be the same.

Owner

igrigorik commented Nov 24, 2011

Yes it would be the same effect. Q: I guess to guard for this we can raise an exception if you're clobbering an existing connection..

Agreed. That's what I would expect as well (raise exception if same name is used again).

@igrigorik igrigorik closed this in 9521261 Nov 26, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment