Skip to content
This repository

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

Closed
joshdevins opened this Issue · 2 comments

2 participants

Josh Devins Ilya Grigorik
Josh Devins

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.

Ilya Grigorik
Owner

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..

Josh Devins

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.