Re: Blocking Method Return
Re: Blocking Method Return
- Subject: Re: Blocking Method Return
- From: j o a r <email@hidden>
- Date: Fri, 2 Dec 2005 17:28:07 +0100
On 2 dec 2005, at 17.14, I. Savant wrote:
In case it wasn't clear, the reason it's not a good idea to block
the main thread is because this leaves no option for a 'cancel'
button that actually listens for a click ... or indeed any standard
UI way of quitting the application failing a cancel button beyond
force-quitting/terminating the app in a very unfriendly way. This
is *NOT* good design in any case.
I think that it's clear from Josh's code snippets that he will allow
the user to interact with the app while he's waiting for this method
to return. The thing I question is the amount of work involved with
implementing and maintaining this, when the reasonable approach (IMO)
would be to have an asynchronous API in the first place.
Why not wrap the Windows API instead, and run it's synchronous method
in a background thread? That way you could have a nice asynchronous
API on both platforms. Problem solved. ;-)
j o a r
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden