This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Interrupted IO and AWT


>>>>> "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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]