Uh, no.

If I had to weigh the programming headaches of having a thread switched out from under me against some meager performance gain, I'd know what to chose. If your fetch takes a long time, then by all means spin it of into another thread and use a WOLongResponse.

And you could do this right now anyway: spin of the thread directly in dispatchRequest, wait for it some time, like 5 seconds and it it hasn't finished, put a ref into some global storage and return a mainly-static refresh page with an URL that include the ref. Then, when this comes in again, check if the thread has finished, rinse, repeat, return the final response if it did.

The main problem is that a session can get checked out only once, so you need the refresh content to be out of the session context.

Cheers, Anjo

Am 09.08.2006 um 20:15 schrieb Mankit Sze:

The method dispatchRequest() is handled by one thread only for Leopard Preview. Although it would be much nicer if the thread can be recycled to do other useful works instead of waiting for a database fetch, which could take a very long time. Agree?

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to