Calling startRequest() from within callback - infinite loop
Hey, great library!
Hoever, I found if you call addRequest from with a callback you get a infinite loop, as the outstanding_requests is not removed until the callback function has returned. If you were to switched this around, so the outstanding_requests is unset beforehand, it would allow addRequest then finishAllRequests to be called within the callback function.
I have modified this locally, I can send it as a p/r if you wish.
Thanks
Thanks Joe! I appreciate it, and a pull request would be handy, and I'll check it over when I have a chance. One pattern I've used in the past is creating a new ParallelCurl object from within the request callback, but I can see why your case is useful.
@petewarden yeah I had considered that, though I am using a layer of abstraction in for the form of a HTTP_Requester class, which does some other boilerplate stuff, so access the same ParallelCurl request was more simple in that case. I'll open a p/r