[foreign-jextract] RFR: Minor change for possible race in shared resource list
Radoslaw Smogura
github.com+7535718+rsmogura at openjdk.java.net
Sat Apr 24 11:37:37 UTC 2021
On Sat, 24 Apr 2021 01:40:40 GMT, Radoslaw Smogura <github.com+7535718+rsmogura at openjdk.org> wrote:
> (1) One or more threads can see "prev" as CLOSED_LIST. Even those CAS will be performed
> and list head will be set to new cleanup. Than exception is going to be thrown.
>
> (2) Than cleanup will continue (maybe skipping just added cleanup).
>
> If in addition, other thread will join in parallel to (1) with cleanup2, than
> queue could look like this HEAD = cleanup2 -> list end marker.
Yes, and I think this requires at least three participants.
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/519
More information about the panama-dev
mailing list