• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Blocking Method Return
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >RE: Blocking Method Return (From: "Josh Ferguson" <email@hidden>)
 >Re: Blocking Method Return (From: j o a r <email@hidden>)
 >Re: Blocking Method Return (From: "I. Savant" <email@hidden>)

  • Prev by Date: job listing: cocoa developer with audio experience
  • Next by Date: Re: Continuously write content of log file to NSTextView
  • Previous by thread: Re: Blocking Method Return
  • Next by thread: Drawing a rectangular matrix of circles - an NSMatrix?
  • Index(es):
    • Date
    • Thread