Clojure

Transient collections should guarantee thread visibility

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: Release 1.7
  • Fix Version/s: Release 1.7
  • Component/s: None
  • Labels:
  • Patch:
    Code
  • Approval:
    Ok

Description

With changes from CLJ-1498, transients are still thread isolated but may move between threads during their lifetime which introduces new concurrency concerns, namely visibility of changes across threads.

Approach: Make all transient collection fields either final or volatile to ensure visibility across threads.

Patch: clj-1580-2.patch

Screened by:

  1. clj-1580.patch
    17/Dec/14 4:10 PM
    2 kB
    Alex Miller
  2. clj-1580-2.patch
    02/Jan/15 11:57 AM
    3 kB
    Alex Miller

Activity

Alex Miller made changes -
Field Original Value New Value
Fix Version/s Release 1.7 [ 10250 ]
Approval Vetted [ 10003 ]
Alex Miller made changes -
Summary Transient collections should support thread visibility Transient collections should guarantee thread visibility
Alex Miller made changes -
Approval Vetted [ 10003 ] Incomplete [ 10006 ]
Alex Miller made changes -
Attachment clj-1580.patch [ 13636 ]
Description With changes from CLJ-1498, transients are still thread isolated but may move between threads during their lifetime which introduces new concurrency concerns, namely visibility of changes across threads. With changes from CLJ-1498, transients are still thread isolated but may move between threads during their lifetime which introduces new concurrency concerns, namely visibility of changes across threads.

*Approach:* Make all transient collection fields either final or volatile to ensure visibility across threads.

*Patch:* clj-1580.patch

*Screened by:*
Approval Incomplete [ 10006 ] Vetted [ 10003 ]
Patch Code [ 10001 ]
Hide
Stuart Halloway added a comment -

Should ATtransientSet.impl be volatile also?

Show
Stuart Halloway added a comment - Should ATtransientSet.impl be volatile also?
Stuart Halloway made changes -
Approval Vetted [ 10003 ] Incomplete [ 10006 ]
Hide
Alex Miller added a comment -

Added -2 patch that makes ATransientSet.impl volatile.

Show
Alex Miller added a comment - Added -2 patch that makes ATransientSet.impl volatile.
Alex Miller made changes -
Attachment clj-1580-2.patch [ 13705 ]
Description With changes from CLJ-1498, transients are still thread isolated but may move between threads during their lifetime which introduces new concurrency concerns, namely visibility of changes across threads.

*Approach:* Make all transient collection fields either final or volatile to ensure visibility across threads.

*Patch:* clj-1580.patch

*Screened by:*
With changes from CLJ-1498, transients are still thread isolated but may move between threads during their lifetime which introduces new concurrency concerns, namely visibility of changes across threads.

*Approach:* Make all transient collection fields either final or volatile to ensure visibility across threads.

*Patch:* clj-1580-2.patch

*Screened by:*
Approval Incomplete [ 10006 ] Vetted [ 10003 ]
Stuart Halloway made changes -
Approval Vetted [ 10003 ] Screened [ 10004 ]
Rich Hickey made changes -
Approval Screened [ 10004 ] Ok [ 10007 ]
Stuart Halloway made changes -
Status Open [ 1 ] Closed [ 6 ]
Resolution Completed [ 1 ]

People

Vote (0)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: