IIRC, that is supposed to be OK. As I wrote it, I think, the terminate() method would in fact take both locks, but because it could not enter that part twice, it could not result in a deadlock. The ConnectionHandler has changed a lot since I last rewrote it though (it took about 12 hours before Tavin decided that my defensive features were redundant and removed them IIRC).
On Wed, Feb 20, 2002 at 11:00:13AM -0500, Gianni Johansson wrote: > Hi Oskar: > I found at least one place where ConnectionHanlder is holding sendLock and > receiveLock at the same time. Is that ok? > > -- gj > > e.g. > CH.SendOutputStream.done() (acquires sendLock) > CH.terminate() -- (acquires receiveLock) > > -- > Freesite > (0.4) freenet:SSK at npfV5XQijFkF6sXZvuO0o~kG4wEPAgM/homepage// > > _______________________________________________ > Devl mailing list > Devl at freenetproject.org > http://lists.freenetproject.org/mailman/listinfo/devl -- Oskar Sandberg oskar at freenetproject.org _______________________________________________ Devl mailing list Devl at freenetproject.org http://lists.freenetproject.org/mailman/listinfo/devl
