You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have customers showing interest in getting the TryOpenExisting methods that take a *Rights parameter ported from .NET Framework (EventWaitHandleRights, MutexRights, SemaphoreRights).
We currently only provide the OpenExisting and TryOpenExisting methods that take a name string as the only parameter, but none that allow specifying rights.
In 3.1, we approved this proposal to port from .NET Framework the methods that could create EventWaitHandle, Mutex and Semaphore objects and take an ACL security object.
Since the original .NET Framework Create methods were static and Windows-specific, we decided to port them into 3.1 inside new static, Windows-specific and ACL-specific classes inside the System.Threading.AccessControl assembly and as part of the System.Threading namespace.
Since the OpenExisting and TryOpenExisting methods are also static in .NET Framework, we could reuse these classes and add the new methods there.
We also have the ThreadingAclExtensions static class in the System.Threading.AccessControl, where we have the GetAccessControl and SetAccessControl static methods defined for EventWaitHandle/Mutex/Semaphore, which is the class that the original 3.1 proposal was suggesting to use for adding the new APIs, but we opted to create the new classes instead.
Risks
Not sure if a risk, but just in case, I thought it was worth pointing out that the System.Threading.AccessControl assembly is a .NET Standard 2.0 OOB package and Windows specific.
Background and Motivation
We have customers showing interest in getting the
TryOpenExisting
methods that take a*Rights
parameter ported from .NET Framework (EventWaitHandleRights
,MutexRights
,SemaphoreRights
).We currently only provide the
OpenExisting
andTryOpenExisting
methods that take aname
string as the only parameter, but none that allow specifying rights.In 3.1, we approved this proposal to port from .NET Framework the methods that could create
EventWaitHandle
,Mutex
andSemaphore
objects and take an ACL security object.Since the original .NET Framework
Create
methods were static and Windows-specific, we decided to port them into 3.1 inside new static, Windows-specific and ACL-specific classes inside theSystem.Threading.AccessControl
assembly and as part of theSystem.Threading
namespace.Since the
OpenExisting
andTryOpenExisting
methods are also static in .NET Framework, we could reuse these classes and add the new methods there.Proposed APIs
Usage
Alternative designs
We also have the ThreadingAclExtensions static class in the
System.Threading.AccessControl
, where we have theGetAccessControl
andSetAccessControl
static methods defined forEventWaitHandle
/Mutex
/Semaphore
, which is the class that the original 3.1 proposal was suggesting to use for adding the new APIs, but we opted to create the new classes instead.Risks
Not sure if a risk, but just in case, I thought it was worth pointing out that the
System.Threading.AccessControl
assembly is a .NET Standard 2.0 OOB package and Windows specific.runtime/src/libraries/System.Threading.AccessControl/src/System.Threading.AccessControl.csproj
Sources
Links to docs and source code
EventWaitHandle
OpenExisting
TryOpenExisting
Mutex
OpenExisting
TryOpenExisting
Semaphore
OpenExisting
TryOpenExisting
The text was updated successfully, but these errors were encountered: