Re: WOWorkerThread deadlocks
Re: WOWorkerThread deadlocks
- Subject: Re: WOWorkerThread deadlocks
- From: Alexis Tual <email@hidden>
- Date: Tue, 11 Sep 2012 21:00:51 +1100
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
Good luck,
Alex
2012/9/11 Maik Musall
<email@hidden>
Hi Alexis,
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden