Skip to content

Commit 8ea7994

Browse files
HugoRossgewarrenkouvel
authored
Update Semaphore.xml (#3810)
* Update Semaphore.xml Added detailed description to the name parameters, explaining the 4 possibilities (prefix with "Global\", prefix with "Local\", name without prefix, null or empty string). * Apply suggestions from code review Co-authored-by: Koundinya Veluri <[email protected]> Co-authored-by: Genevieve Warren <[email protected]> Co-authored-by: Koundinya Veluri <[email protected]>
1 parent 3d136a4 commit 8ea7994

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

xml/System.Threading/Semaphore.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@
199199
<Docs>
200200
<param name="initialCount">The initial number of requests for the semaphore that can be granted concurrently.</param>
201201
<param name="maximumCount">The maximum number of requests for the semaphore that can be granted concurrently.</param>
202-
<param name="name">The name of a named system semaphore object.</param>
202+
<param name="name">The name of the semaphore. If it is <see langword="null" /> or empty, a process-local semaphore is created. If the name is prefixed by "Global\", a machine-wide semaphore is created (or the existing one returned). If it is prefixed by "Local\", a session-wide semaphore is created (or the existing one returned). If the name is not prefixed at all, a session-wide semaphore is created (same as prefix "Local\"). Both prefix and name are case-sensitive.</param>
203203
<summary>Initializes a new instance of the <see cref="T:System.Threading.Semaphore" /> class, specifying the initial number of entries and the maximum number of concurrent entries, and optionally specifying the name of a system semaphore object.</summary>
204204
<remarks>
205205
<format type="text/markdown"><![CDATA[
@@ -291,7 +291,7 @@
291291
<Docs>
292292
<param name="initialCount">The initial number of requests for the semaphore that can be satisfied concurrently.</param>
293293
<param name="maximumCount">The maximum number of requests for the semaphore that can be satisfied concurrently.</param>
294-
<param name="name">The name of a named system semaphore object.</param>
294+
<param name="name">The name of the semaphore. If it is <see langword="null" /> or empty, a process-local semaphore is created. If the name is prefixed by "Global\", a machine-wide semaphore is created (or the existing one returned). If it is prefixed by "Local\", a session-wide semaphore is created (or the existing one returned). If the name is not prefixed at all, a session-wide semaphore is created (same as prefix "Local\"). Both prefix and name are case-sensitive.</param>
295295
<param name="createdNew">When this method returns, contains <see langword="true" /> if a local semaphore was created (that is, if <paramref name="name" /> is <see langword="null" /> or an empty string) or if the specified named system semaphore was created; <see langword="false" /> if the specified named system semaphore already existed. This parameter is passed uninitialized.</param>
296296
<summary>Initializes a new instance of the <see cref="T:System.Threading.Semaphore" /> class, specifying the initial number of entries and the maximum number of concurrent entries, optionally specifying the name of a system semaphore object, and specifying a variable that receives a value indicating whether a new system semaphore was created.</summary>
297297
<remarks>
@@ -368,7 +368,7 @@
368368
<Docs>
369369
<param name="initialCount">The initial number of requests for the semaphore that can be satisfied concurrently.</param>
370370
<param name="maximumCount">The maximum number of requests for the semaphore that can be satisfied concurrently.</param>
371-
<param name="name">The name of a named system semaphore object.</param>
371+
<param name="name">The name of the semaphore. If it is <see langword="null" /> or empty, a process-local semaphore is created. If the name is prefixed by "Global\", a machine-wide semaphore is created (or the existing one returned). If it is prefixed by "Local\", a session-wide semaphore is created (or the existing one returned). If the name is not prefixed at all, a session-wide semaphore is created (same as prefix "Local\"). Both prefix and name are case-sensitive.</param>
372372
<param name="createdNew">When this method returns, contains <see langword="true" /> if a local semaphore was created (that is, if <paramref name="name" /> is <see langword="null" /> or an empty string) or if the specified named system semaphore was created; <see langword="false" /> if the specified named system semaphore already existed. This parameter is passed uninitialized.</param>
373373
<param name="semaphoreSecurity">A <see cref="T:System.Security.AccessControl.SemaphoreSecurity" /> object that represents the access control security to be applied to the named system semaphore.</param>
374374
<summary>Initializes a new instance of the <see cref="T:System.Threading.Semaphore" /> class, specifying the initial number of entries and the maximum number of concurrent entries, optionally specifying the name of a system semaphore object, specifying a variable that receives a value indicating whether a new system semaphore was created, and specifying security access control for the system semaphore.</summary>
@@ -545,7 +545,7 @@
545545
<Parameter Name="name" Type="System.String" />
546546
</Parameters>
547547
<Docs>
548-
<param name="name">The name of the system semaphore to open.</param>
548+
<param name="name">The name of the semaphore. If it's prefixed by "Global\", it refers to a machine-wide semaphore. If it's prefixed by "Local\" or doesn't have a prefix, it refers to a session-wide semaphore. Both prefix and name are case-sensitive.</param>
549549
<summary>Opens the specified named semaphore, if it already exists.</summary>
550550
<returns>An object that represents the named system semaphore.</returns>
551551
<remarks>
@@ -620,7 +620,7 @@
620620
<Parameter Name="rights" Type="System.Security.AccessControl.SemaphoreRights" Index="1" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
621621
</Parameters>
622622
<Docs>
623-
<param name="name">The name of the system semaphore to open.</param>
623+
<param name="name">The name of the semaphore. If it's prefixed by "Global\", it refers to a machine-wide semaphore. If it's prefixed by "Local\" or doesn't have a prefix, it refers to a session-wide semaphore. Both prefix and name are case-sensitive.</param>
624624
<param name="rights">A bitwise combination of the enumeration values that represent the desired security access.</param>
625625
<summary>Opens the specified named semaphore, if it already exists, with the desired security access.</summary>
626626
<returns>An object that represents the named system semaphore.</returns>
@@ -959,7 +959,7 @@
959959
<Parameter Name="result" Type="System.Threading.Semaphore" RefType="out" Index="1" FrameworkAlternate="dotnet-uwp-10.0;net-5.0;netcore-1.0;netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-1.0;netstandard-1.1;netstandard-1.2;netstandard-1.3;netstandard-1.4;netstandard-1.6;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
960960
</Parameters>
961961
<Docs>
962-
<param name="name">The name of the system semaphore to open.</param>
962+
<param name="name">The name of the semaphore. If it's prefixed by "Global\", it refers to a machine-wide semaphore. If it's prefixed by "Local\" or doesn't have a prefix, it refers to a session-wide semaphore. Both prefix and name are case-sensitive.</param>
963963
<param name="result">When this method returns, contains a <see cref="T:System.Threading.Semaphore" /> object that represents the named semaphore if the call succeeded, or <see langword="null" /> if the call failed. This parameter is treated as uninitialized.</param>
964964
<summary>Opens the specified named semaphore, if it already exists, and returns a value that indicates whether the operation succeeded.</summary>
965965
<returns>
@@ -1016,7 +1016,7 @@
10161016
<Parameter Name="result" Type="System.Threading.Semaphore" RefType="out" Index="2" FrameworkAlternate="netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
10171017
</Parameters>
10181018
<Docs>
1019-
<param name="name">The name of the system semaphore to open.</param>
1019+
<param name="name">The name of the semaphore. If it's prefixed by "Global\", it refers to a machine-wide semaphore. If it's prefixed by "Local\" or doesn't have a prefix, it refers to a session-wide semaphore. Both prefix and name are case-sensitive.</param>
10201020
<param name="rights">A bitwise combination of the enumeration values that represent the desired security access.</param>
10211021
<param name="result">When this method returns, contains a <see cref="T:System.Threading.Semaphore" /> object that represents the named semaphore if the call succeeded, or <see langword="null" /> if the call failed. This parameter is treated as uninitialized.</param>
10221022
<summary>Opens the specified named semaphore, if it already exists, with the desired security access, and returns a value that indicates whether the operation succeeded.</summary>

0 commit comments

Comments
 (0)