Use manual locking for your background threads, your snippet is right, be
sure your localEC has autolock set to false.
Check out Kerian presentation at WOWODC 2011 :
http://www.wocommunity.org/podcasts/wowodc/2011/BackgroundTasks.mov
and the examples :
https://github.com/projectwonder/wonder/tree/master/Examples/Misc/BackgroundTasks

Good luck,

Alex

2012/9/11 Maik Musall <m...@selbstdenker.ag>

>
> Am 11.09.2012 um 09:10 schrieb Maik Musall <m...@selbstdenker.ag>:
>
> Hi Alexis,
>
> Am 10.09.2012 um 23:19 schrieb Alexis Tual <alexis.t...@gmail.com>:
>
> Note that I recently switched to Wonder for this project (using all the
>> Wonder base classes), and since I did, this problem occurred more
>> frequently. It's now almost once a day, and was about once a week before. I
>> switched from MultiECLockManager to ERXEC with autolocking in the process.
>>
>
> I've seen you have long response pages, have you turned off autolocking
> for these special cases ?
>
>
> Good point. I just checked: those are simple WOLongResponsePages that
> don't hold anything regarding EOF, just wait for the background worker
> thread to notify when it's done. The background workers all use manual
> locking, but some of them don't explicitly use my manual locking EC factory
> but use an autolocking EC and do manual locking on top. I'll correct that,
> thanks.
>
>
> Hmm, seems I have the choice between
> * use manual locking only in those background worker threads
> * diss manual locks and rely on autolocking for them.
>
> Worker threads are all implemented like this:
>
> public void run() {
>   localEC.lock();
>   try {
>     // heavy duty fetches, batchfetches, filtering and stuff that can take
> a minute
>   } finally {
>     localEC.unlock();
>   }
> }
>
> What would you recommend? My ERXEC-subclass-factory can give me either
> type.
>
> Maik
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to