Interrupted IO and AWT
Tom Tromey
tromey@cygnus.com
Tue Mar 21 13:30:00 GMT 2000
>>>>> "Jeff" == Jeff Sturm <jsturm@sigma6.com> writes:
Jeff> Unfortunately Java supports just one synchronization primitive
Jeff> which must behave reasonably in all scenarios, even if (e.g.) a
Jeff> thread blocks on I/O.
One option would be to implement locks so that an attempt to acquire a
lock which is held by an I/O-blocked thread would cause a real block
instead of a spin. There are a lot of tradeoffs to make if we take
this route.
It does seem that we'll want some sort of configurable scheme.
Nothing we can come up with will be right in 100% of the
circumstances. For "big" implementations we should definitely
consider an adaptive approach. If I ever have time I'll dig up the
literature on this stuff. Meanwhile, anybody with the rare
combination of motivation and time is welcome to take a shot.
Tom
More information about the Java
mailing list