Provide an inter-process variant of SpinLock #121742
Unanswered
The-Futurist
asked this question in
Ideas
Replies: 1 comment 1 reply
-
|
You can just put the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently to spin-synchronize threads in different processes that are sharing mapped memory, we must roll our own spinlock-like primitive based on interlocked operations. It would be most helpful to have an alternative
SpinLockimplementation that took an additionalref lockDatumarg to theEntermethod (or perhaps a new constructor overload) so that the memory used for the internal interlocked operation can be situated in shared memory.Users of this would be expected to ensure appropriate initialization of the lock datum before making use of it (much as we do now when using
Interlocked.CompareExchangedirectly).Beta Was this translation helpful? Give feedback.
All reactions