This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: Interrupted IO and AWT
- To: Jeff Sturm <jsturm at sigma6 dot com>
- Subject: Re: Interrupted IO and AWT
- From: Tom Tromey <tromey at cygnus dot com>
- Date: Tue, 21 Mar 2000 13:30:05 -0800 (PST)
- Cc: "Boehm, Hans" <hans_boehm at hp dot com>, Tom Tromey <tromey at cygnus dot com>, Bryce McKinlay <bryce at albatross dot co dot nz>, java-discuss at sourceware dot cygnus dot com
- References: <140D21516EC2D3119EE700902787664456E70C@hplex1.hpl.hp.com><38D7D98C.83138F88@sigma6.com>
>>>>> "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