{"issue":{"title":"Added parallel request support to EMSynchrony adapter.","user":{"login":"jimeh","id":39563,"url":"https://api.github.com/users/jimeh","avatar_url":"https://secure.gravatar.com/avatar/c48498c82bfaf0c6c8843ba85e3cd598?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"c48498c82bfaf0c6c8843ba85e3cd598"},"created_at":"2011-07-26T13:05:25Z","milestone":null,"state":"closed","updated_at":"2011-12-29T00:17:26Z","labels":[],"id":1288514,"closed_at":"2011-12-28T21:48:21Z","html_url":"https://github.com/technoweenie/faraday/issues/70","pull_request":{"patch_url":"https://github.com/technoweenie/faraday/pull/70.patch","html_url":"https://github.com/technoweenie/faraday/pull/70","diff_url":"https://github.com/technoweenie/faraday/pull/70.diff"},"body":"In short, it's now possible to trigger multiple requests in parallel when using the EMSynchrony adapter without locking up the reactor, like the Typhoeus adapter does. The `#in_parallel` call will wrap itself in an EM reactor and fiber if needed, just like non-parallel calls do as well.\r\n\r\nWhen used outside of the `#in_parallel` block, the EMSynchrony adapter still works exactly the same way as it used to.\r\n\r\nAs a last note, I think a section in the README about performing parallel calls with Typhoeus and EMSynchrony would be a good idea. It took me some time to figure out exactly how it's supposed to work, and be used. I'd be glad to put such a section together as soon as I have some free time :)\r\n\r\nP.S. You're welcome to ignore the commits regarding RVM and the Rakefile, it went in out of habit :P","number":70,"url":"https://api.github.com/repos/technoweenie/faraday/issues/70","comments":7,"assignee":null},"comment":{"user":{"login":"jimeh","id":39563,"url":"https://api.github.com/users/jimeh","avatar_url":"https://secure.gravatar.com/avatar/c48498c82bfaf0c6c8843ba85e3cd598?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"c48498c82bfaf0c6c8843ba85e3cd598"},"created_at":"2011-12-29T00:17:26Z","updated_at":"2011-12-29T00:17:26Z","id":3296753,"body":"@technoweenie I did have a look at simplifying the parallel manager stuff around the time I was working on this pull request. My original idea was to use #setup_parallel_manager from the adapter in use if no arguments are passed to #in_parallel. I didn't get anywhere with it though cause I couldn't see a simple way to determine which adapter had been loaded in as it's just another middleware in the stack. I think the #in_parallel is a simple and good enough DSL, but having to manually pass in the parallel manager from the adapter you're using is a serious pain. I'll hopefully have time to tinker with that too tomorrow :)\r\n\r\nAnd sorry for not getting around to writing any parallel guides myself, like I promised >_<\r\n\r\n@mislav No problem. I must have missed that ENV check in the test files. And the .rvmrc file I added out of old horrible habit (which I've now shaken... lol)","url":"https://api.github.com/repos/technoweenie/faraday/issues/comments/3296753"},"action":"created"}