Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #18930
| Path | csiph.com!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail |
|---|---|
| From | Jan Burse <janburse@fastmail.fm> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Interrupted exception chaining |
| Date | Tue, 25 Sep 2012 23:55:25 +0200 |
| Organization | albasani.net |
| Lines | 38 |
| Message-ID | <k3t98d$pve$1@news.albasani.net> (permalink) |
| References | <d203b18b-61ce-439e-9b1f-9cf056c1d161@googlegroups.com> <ETk8s.3$kz7.0@newsfe02.iad> <k3t429$f84$1@news.albasani.net> <k3t4lq$tmk$1@dont-email.me> <k3t59s$i1e$1@news.albasani.net> <k3t6gk$b8o$1@dont-email.me> <k3t8gv$ol4$1@news.albasani.net> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | news.albasani.net j+wi3MmHamPo4b6KrLzldpCoVXvaReLwXZQ4FcW6y6uOxrQ59ql0OHGekZkZJ8LKpomPwXzzMfTPkVbp0lcTP6e6pB1YanEQ1X35GtetP7s461kRTUYKXmQ17sYrLult |
| NNTP-Posting-Date | Tue, 25 Sep 2012 21:55:25 +0000 (UTC) |
| Injection-Info | news.albasani.net; logging-data="hh9vGmYWeKBLy/MpcODX9nUaX8IUyY0rdscKZo815OE9u9CeTp0bPySO34SbO1Us75I3sw7Hd/mIvsBZC2jZLudBZvenYJi1XHCbNmCnLf0ThJ6clZCi9TUuf/Df6r0M"; mail-complaints-to="abuse@albasani.net" |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120909 Firefox/15.0.1 SeaMonkey/2.12.1 |
| In-Reply-To | <k3t8gv$ol4$1@news.albasani.net> |
| Cancel-Lock | sha1:y8e1/W9lSP2tn3bYNZsLo7mkUmo= |
| Xref | csiph.com comp.lang.java.programmer:18930 |
Show key headers only | View raw
But the programming pattern for awaitUninterruptibly() would
be different from uninterruptableWait(). Since the spec says
that spurious wakeups are still posible. So I guess something
along:
while (!(flag=Thread.interrupted()) && !<cond>)
awaitUninterruptibly();
if (!flag)
<action>
} else {
Thread.currentThread().interrupt();
}
Ugly
Jan Burse schrieb:
> Hi,
>
> markspace schrieb:
>> I don't see how "done" can be reliably reset. There's going to be a
>> race condition somewhere. Might as well use ReetrantLock, it solves
>> this problem.
>
> Do you refer to:
>
> Condition.awaitUninterruptibly() ?
> http://docs.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/locks/Condition.html#awaitUninterruptibly%28%29
>
>
> Didn't look yet at the source. What is the design?
>
> Bye
>
>
>
>
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Interrupted exception chaining raphfrk@gmail.com - 2012-09-25 03:25 -0700
Re: Interrupted exception chaining Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-09-25 08:56 -0400
Re: Interrupted exception chaining markspace <-@.> - 2012-09-25 08:33 -0700
Re: Interrupted exception chaining Ivan Ryan <ivan.ryan@gmail.com> - 2012-09-25 09:28 -0700
Re: Interrupted exception chaining Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-09-25 13:12 -0400
Re: Interrupted exception chaining markspace <-@.> - 2012-09-25 12:00 -0700
Re: Interrupted exception chaining Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-09-25 09:22 -0700
Re: Interrupted exception chaining Jan Burse <janburse@fastmail.fm> - 2012-09-25 22:26 +0200
Re: Interrupted exception chaining markspace <-@.> - 2012-09-25 13:37 -0700
Re: Interrupted exception chaining Jan Burse <janburse@fastmail.fm> - 2012-09-25 22:47 +0200
Re: Interrupted exception chaining Jan Burse <janburse@fastmail.fm> - 2012-09-25 22:53 +0200
Re: Interrupted exception chaining Jan Burse <janburse@fastmail.fm> - 2012-09-25 22:53 +0200
Re: Interrupted exception chaining markspace <-@.> - 2012-09-25 14:08 -0700
Re: Interrupted exception chaining Jan Burse <janburse@fastmail.fm> - 2012-09-25 23:23 +0200
Re: Interrupted exception chaining Jan Burse <janburse@fastmail.fm> - 2012-09-25 23:24 +0200
Re: Interrupted exception chaining Jan Burse <janburse@fastmail.fm> - 2012-09-25 23:32 +0200
Re: Interrupted exception chaining Jan Burse <janburse@fastmail.fm> - 2012-09-25 23:42 +0200
Re: Interrupted exception chaining Jan Burse <janburse@fastmail.fm> - 2012-09-25 23:48 +0200
Re: Interrupted exception chaining Jan Burse <janburse@fastmail.fm> - 2012-09-25 23:55 +0200
Re: Interrupted exception chaining markspace <-@.> - 2012-09-25 15:33 -0700
Re: Interrupted exception chaining Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-09-25 21:43 -0400
Re: Interrupted exception chaining Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2012-09-26 01:43 +0200
Re: Interrupted exception chaining Jan Burse <janburse@fastmail.fm> - 2012-09-26 10:24 +0200
Re: Interrupted exception chaining Jan Burse <janburse@fastmail.fm> - 2012-09-26 10:32 +0200
Re: Interrupted exception chaining Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2012-09-26 16:26 +0200
csiph-web