Closed kluivers closed 13 years ago
Unfortunately this change breaks the acceptance tests, so I'll need to look at this a bit more.
OK, this change doesn't seem to be compatible with the current synchronous proxy implementation, which causes it to block indefinitely.
I've experienced no issues with NSURLConnection running on the operation's background thread so I'm afraid I have to reject this change as it is.
I will incorporate the runloop change however.
In cases where your callback behaviour needs to run on the main thread, I'd suggest you use dispatch_(a)sync with dispatch_get_main_queue().
As a compromise, I've committed a new change that ensures all delegate callbacks will occur on the main thread, by making use of GCD. Let me know how this works for you.
I changed the way LRURLRequestOperation behaves as a concurrent operation. First of all let me say I really like LRResty. It's much like the frameworks I usually build internally in my apps to do networking. I switched to Resty because it's much more reusable and contains more features. However after switching I ran into several issues that I had solved in my code already. This pull-request will address a few of them.
By making sure the NSURLConnection is being executed on the main thread, callbacks will be handles on the main thread, so it makes it save to actually update the UI in a response.