|
thread.interrupt() will only work for blocking io. (or wait) You can't just interrupt a running thread. There is no way to do that in java. (thread.stop() can't be used and that is also a thing you don't want to do) second you don't have any idea which thread handles what at the moment.. And if you just "crash" the thread then the components /models can be in a complete invalid state. So just let it go is the only thing that can be done. Gili wrote: Suggestion: right before you lock on the session, check if it is currently in mid-processing. If so, call Thread.interrupt() on it or signal interruption in some other manner, *then* lock on the session. The benefit here is that if a user hits REFRESH multiple times quickly, we don't fall behind trying to render pages when they have been aborted.I know how to implement this easily under JDK 1.5 (using java.util.concurrent.Lock) but I'm not sure how you could do it using older JDKs... Still, I think it is a great idea and would give Wicket a huge advantage over other frameworks from a scalability point of view. Gili On Wed, 05 Jan 2005 16:26:50 +0100, Eelco Hillenius wrote: |
- Re: [Wicket-develop] sychronize around session object Gili
- Re: [Wicket-develop] sychronize around session object Johan Compagner
