RFR: jsr166 jdk10 integration wave 6
http://cr.openjdk.java.net/~martin/webrevs/openjdk10/jsr166-integration/over... Thanks to Dávid Karnok and Pavel Rappo for help with SubmissionPublisher. 8191937: Lost interrupt in AbstractQueuedSynchronizer when tryAcquire methods throw 8187947: A race condition in SubmissionPublisher 8191069: Miscellaneous changes imported from jsr166 CVS 2017-12
On 27 Nov 2017, at 20:19, Martin Buchholz <martinrb@google.com> wrote:
http://cr.openjdk.java.net/~martin/webrevs/openjdk10/jsr166-integration/over...
Thanks to Dávid Karnok and Pavel Rappo for help with SubmissionPublisher.
8191937: Lost interrupt in AbstractQueuedSynchronizer when tryAcquire methods throw
AbstractQueuedSynchronizerTest.java — 1296 public void XXXXtestCancelCancelRace() throws InterruptedException { Suggest “DISABLED_” prefix rather than “XXXX?
8187947: A race condition in SubmissionPublisher
Need some more time to look at this; it is pleasing to see use of VH.getAndBitwiseOr :-)
8191069: Miscellaneous changes imported from jsr166 CVS 2017-12
+1 Paul.
On 11/28/2017 12:50 PM, Paul Sandoz wrote:
8187947: A race condition in SubmissionPublisher
Need some more time to look at this; it is pleasing to see use of VH.getAndBitwiseOr :-)
Yes; not only is it the technique that allows covering this borderline-misuse case without slowing down others, but it also makes for simpler code. And even on those machines not natively supporting, the internal CAS or LL/SC loops to implement are likely faster than what we can do from Java. I plan to update some other j.u.c classes to use it when applicable (although not immediately). -Doug
On Tue, Nov 28, 2017 at 9:50 AM, Paul Sandoz <paul.sandoz@oracle.com> wrote:
1296 public void XXXXtestCancelCancelRace() throws InterruptedException {
Suggest “DISABLED_” prefix rather than “XXXX?
done.
On 27 Nov 2017, at 20:19, Martin Buchholz <martinrb@google.com> wrote:
http://cr.openjdk.java.net/~martin/webrevs/openjdk10/jsr166-integration/over... <http://cr.openjdk.java.net/~martin/webrevs/openjdk10/jsr166-integration/overview.html>
Thanks to Dávid Karnok and Pavel Rappo for help with SubmissionPublisher.
8191937: Lost interrupt in AbstractQueuedSynchronizer when tryAcquire methods throw 8187947: A race condition in SubmissionPublisher
Hard to review by eyeballing code but it looks good to me. SubmissionPublisher -- 1004 // Order-sensitive field declarations Is this still relevant with the use of @Contended on the demand/waiting fields of BufferedSubscription and periodic updates? 81 * <p>A single SubmissionPublisher may be shared among multiple 82 * sources. Actions in a source thread prior to publishing an item or 83 * issuing a signal <a href="package-summary.html#MemoryVisibility"> 84 * <i>happen-before</i></a> actions subsequent to the corresponding 85 * access by each subscriber. But reported estimates of lag and demand 86 * are designed for use in monitoring, not for synchronization 87 * control, and may reflect stale or inaccurate views of progress. We probably need a CSR for this. Is “corresponding access by each subscriber” referring to access of the published item by each subscriber? Paul.
8191069: Miscellaneous changes imported from jsr166 CVS 2017-12
On 11/29/2017 01:43 PM, Paul Sandoz wrote:
SubmissionPublisher --
1004 // Order-sensitive field declarations
Is this still relevant
Not really; layout is now discussed in class-level doc. Removed. Thanks.
81 * <p>A single SubmissionPublisher may be shared among multiple 82 * sources. Actions in a source thread prior to publishing an item or 83 * issuing a signal <a href="package-summary.html#MemoryVisibility"> 84 * <i>happen-before</i></a> actions subsequent to the corresponding 85 * access by each subscriber. But reported estimates of lag and demand 86 * are designed for use in monitoring, not for synchronization 87 * control, and may reflect stale or inaccurate views of progress.
We probably need a CSR for this.
Yeah, I guess so, even though it is just a clarification.
Is “corresponding access by each subscriber” referring to access of the published item by each subscriber?
Yes. And also for signals like closeExceptionally exceptions. This seems to cover both cases, but maybe could be improved. -Doug
participants (3)
-
Doug Lea
-
Martin Buchholz
-
Paul Sandoz