• 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: fetch loop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fetch loop


  • Subject: Re: fetch loop
  • From: Kieran Kelleher <email@hidden>
  • Date: Wed, 26 Apr 2006 14:00:31 -0400

Philippe,

If you can understand Chinese, you will have no problem understanding threads ;-)

The guys on Software Engineering Radio have just started a series of podcasts on concurrency.
http://se-radio.net/

Seriously though, sooner or later, you need to have separate threads doing work independently of the Request-Response loop (WO's "built-in" WorkerThreads). If you have long running tasks, you need a separate thread to run while using something like a WOLongResponsePage to keep the user posted on the status of the long process.

For beginning to understand threads, look at chapter 15, Networking and Threads of Head First Java.... and just google for a few intro articles and learn about synchronized, deadlock, Runnable, Callable and ExecutorService, manage your editing contexts properly in the threads, use backport-util-concurrent and you'll be multi-threading in no time!

Regards, Kieran

On Apr 26, 2006, at 11:56 AM, Philippe Lafoucrière wrote:


On 25 avr. 06, at 12:55, Kieran Kelleher wrote:

Also, when I said the "DA can run the code", I really mean the "DA should spawn off your CheckRemoteTask into a separate thread" in case your checking code is longer than the allowable 30 seconds for R-R loop. This is really easy if your just use use an ExecutorService to run your CheckRemoteTask (since TimerTask is Runnable already)

ExecutorService is part of java 1.5, BUT we can use the java 1.5 java.util.concurrent in java 1.4 by simply getting the bacport from here:
http://dcl.mathcs.emory.edu/util/backport-util-concurrent/


Thank you for your suggestion, this sounds like chinese today for me, I have to read some doc now :)

Philippe

 _______________________________________________
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

References: 
 >fetch loop (From: Philippe Lafoucrière <email@hidden>)
 >Re: fetch loop (From: Kieran Kelleher <email@hidden>)
 >Re: fetch loop (From: Philippe Lafoucrière <email@hidden>)
 >Re: fetch loop (From: Kieran Kelleher <email@hidden>)
 >Re: fetch loop (From: Philippe Lafoucrière <email@hidden>)

  • Prev by Date: Re: Custom PopUp Problems
  • Next by Date: Re: Webobjects-dev Digest, Vol 3, Issue 264
  • Previous by thread: Re: fetch loop
  • Next by thread: Re: fetch loop
  • Index(es):
    • Date
    • Thread