Re: Cheating a synchronous call on the main thread
Re: Cheating a synchronous call on the main thread
- Subject: Re: Cheating a synchronous call on the main thread
- From: Gavin Eadie <email@hidden>
- Date: Mon, 29 Jun 2015 13:13:53 -0400
> On Jun 29, 2015, at 12:28 PM, Scott Ribe <email@hidden> wrote:
>
>> […] we have a counterexample in the form of the Canon ED-SDK, which somehow does accomplish this.
>
> I seriously doubt that. It's probably performing the work on a background thread,
> then using some callback to execute the "after" code when it's done--which is what you should be doing.
I can’t argue with any of that and, as noted, "what you should be doing” is already known, but thanks for extra diligence to keep me honest!
The problem with the callback to “after” is that “after” is just the continuation of the program and possibly nothing to do with what happens in “fakeSyncrony” .. I suppose the first thing “fakeSyncrony” could do is grab the address of the next instruction and make it the address to call back to. This sounds a little like Jens’ “crazy runtime manipulation of the stack to accomplish what functional languages call continuations”.
I do appreciate the responses to my question, and apologize for asking you to suggest unspeakable violations of good practice .. Gavin
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden