• 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: Background threads and maintenance applications - how to terminate them safely?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Background threads and maintenance applications - how to terminate them safely?


  • Subject: Re: Background threads and maintenance applications - how to terminate them safely?
  • From: Lachlan Deck <email@hidden>
  • Date: Tue, 23 Oct 2007 10:08:01 +1000

Hi there,

On 23/10/2007, at 9:30 AM, Miguel Arroz wrote:

My problem is: I have two types of situations that worry me:

1) A maintenance app that is running on the server, with no user interaction. It just seats there, in an infinite loop, doing stuff that need to be done.

See below.

2) A normal app that sometimes launches a background thread to process some stuff. The ideia is that the user submits data, but the data processing may take some time (30 seconds, for example). What I want is to send the "OK, great, it's done" page to the user, terminate the session, and process his data in the background before saving it.

WOLongResponse + NSNotificationCenter.

My question is: how can I terminate this apps safely? When we are talking about sessions, we have the "Refuse new sessions" option, that will hold the app until no more active sessions exist. This will terminate apps safely, without discarding data. How to do this with background threads? How can I tell WO "do not terminate the app until this thread is over or this method is done"?

See WOApplication.terminate/isTerminating.

with regards,
--

Lachlan Deck



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Background threads and maintenance applications - how to terminate them safely?
      • From: Miguel Arroz <email@hidden>
References: 
 >Background threads and maintenance applications - how to terminate them safely? (From: Miguel Arroz <email@hidden>)

  • Prev by Date: Background threads and maintenance applications - how to terminate them safely?
  • Next by Date: Re: Background threads and maintenance applications - how to terminate them safely?
  • Previous by thread: Background threads and maintenance applications - how to terminate them safely?
  • Next by thread: Re: Background threads and maintenance applications - how to terminate them safely?
  • Index(es):
    • Date
    • Thread