• 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: Interrupting a fetch that is taking too long
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Interrupting a fetch that is taking too long


  • Subject: Re: Interrupting a fetch that is taking too long
  • From: Art Isbell <email@hidden>
  • Date: Tue, 15 May 2007 13:23:40 -1000

On May 15, 2007, at 12:04 PM, John Huss wrote:

Actually terminating a query in progress is database-specific, so
there is no EOF way to do it.

EOAdaptor's cancelFetch() should do what the method name implies. Each database plugin includes an EOAdaptor subclass that overrides cancelFetch() to do the database-specific mojo necessary to cancel a fetch in progress.


You'd probably need to write your own fetchRow() loop checking at each iteration whether to cancel the fetch. But doing so isn't as easy in a WO app with its very long event loop compared with the desktop environment with its short event loop. Maybe you could have a timer running in one thread set a "cancelFetch" variable to true while the fetch loop in a different thread could check the value of "cancelFetch" during each iteration. But then you'd need to turn this array of fetched dictionaries into EO's in an editing context in the same way as using an editing context to fetch which isn't something that I'd like to mimic.

Aloha,
Art

_______________________________________________
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: Interrupting a fetch that is taking too long
      • From: Patrick Middleton <email@hidden>
References: 
 >Interrupting a fetch that is taking too long (From: Ricardo Parada <email@hidden>)
 >Re: Interrupting a fetch that is taking too long (From: Kieran Kelleher <email@hidden>)
 >Re: Interrupting a fetch that is taking too long (From: "John Huss" <email@hidden>)

  • Prev by Date: Re: Snapshot Question
  • Next by Date: Re: EOGenerator and prototypes
  • Previous by thread: Re: Interrupting a fetch that is taking too long
  • Next by thread: Re: Interrupting a fetch that is taking too long
  • Index(es):
    • Date
    • Thread