-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Direct app exec #38
base: master
Are you sure you want to change the base?
Direct app exec #38
Conversation
Bug-fix: Fall back to orientation via status-bar when orientation via de...
Allowing UIAlertViews be queryable in iOS7.
…nerate Pull request.
* If the first pathComponent is "direct_app_exec" then the execution should happen in THIS thread, | ||
* not in the main UI thread as is true for all other commands. | ||
*/ | ||
if ([path hasSuffix:@"direct_app_exec"]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really happy with this approach. Feels pretty hacky to hard-code intimate knowledge about that specific command in the path routing code.
Is there a way we can instead have the DirectAppExecCommand run its command in its own thread? That seems like it'd achieve the same goals.
It sounds like DirectAppExecCommand is a total copy-and-paste of AppCommand. In that case why not just use AppCommand? |
As I say in the code comments for DirectAppExecCommand: There are certain situations in my app where executing a command on the main UI thread can cause a thread deadlock. In these situations I need to execute the command on “some other thread”, and the HTTP thread seemed easy and convenient. If you don’t think others need this kind of functionality, then you can skip this pull request. I’ve just been trying to get ALL my Frank modifications pushed into the main project on GitHub. Thanks, From: Pete Hodgson [mailto:[email protected]] It sounds like DirectAppExecCommand is a total copy-and-paste of AppCommand. In that case why not just use AppCommand? — |
What I was getting at is if it's the same implementation, why not just ditch
Either way, I'm not really happy with the hard-coding in |
The DirectAppExec command was copied directly from AppCommand.m. The only difference in this command is that the RequestRouter.m executes it on the HTTP thread rather than on the main UI thread. This is required in my application because running some commands on the UI thread can cause deadlocks.