• 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: NSTerminateLater and thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTerminateLater and thread


  • Subject: Re: NSTerminateLater and thread
  • From: Kyle Sluder <email@hidden>
  • Date: Fri, 03 Jun 2011 11:35:41 -0700

2011/6/3 Peter Lübke <email@hidden>:
> Return NSTerminateCancel when applicationShouldTerminate calls
> ExecuteLogOutTask to be performed in a secondary thread.
> At the end of your ExecuteLogOutTask method, call something like
> [myApplicationDelegate performSelectorOnMainThread:(logOutTaskDidFinish)
>  withObject:nil waitUntilDone:NO].
> Then, in logOutTaskDidFinish, call NSApplication's -terminate: method and
> set a flag indicating that ExecuteLogOutTask was already executed.
> The next time applicationShouldTerminate is called, return NSTerminateNow if
> this flag is has been set so ExecuteLogOutTask is not called forever.

That's not going to resume the aborted logout.

Leonardo, you will need to either finish your task in the time
allotted by NSTerminateLater, or you will need to abort logout.

--Kyle Sluder
_______________________________________________

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

  • Follow-Ups:
    • Re: NSTerminateLater and thread
      • From: Leonardo <email@hidden>
References: 
 >NSTerminateLater and thread (From: Leonardo <email@hidden>)
 >Re: NSTerminateLater and thread (From: Peter Lübke <email@hidden>)

  • Prev by Date: Re: OS + iOS best practice
  • Next by Date: Re: Programmatically displaying UISplitViewController popover?
  • Previous by thread: Re: NSTerminateLater and thread
  • Next by thread: Re: NSTerminateLater and thread
  • Index(es):
    • Date
    • Thread