Skip to content

Commit 440b9d2

Browse files
author
Koundinya Veluri
committed
OpenExisting may throw WaitHandleCannotBeOpenedException or TryOpenExisting may return false for invalid names in some cases
1 parent 3c41763 commit 440b9d2

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

xml/System.Threading/EventWaitHandle.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ There was some other error. The `HResult` property may provide more information.
586586
.NET Framework only: <paramref name="name" /> is longer than MAX_PATH (260 characters).</exception>
587587
<exception cref="T:System.ArgumentNullException">
588588
<paramref name="name" /> is <see langword="null" />.</exception>
589-
<exception cref="T:System.Threading.WaitHandleCannotBeOpenedException">A synchronization object with the provided <paramref name="name" /> cannot be opened. It may not exist, or a synchronization object of a different type might have the same name.</exception>
589+
<exception cref="T:System.Threading.WaitHandleCannotBeOpenedException">A synchronization object with the provided <paramref name="name" /> cannot be opened. It may not exist, or a synchronization object of a different type might have the same name. In some cases, this exception may be thrown for invalid names.</exception>
590590
<exception cref="T:System.ArgumentException">
591591
<paramref name="name" /> is an empty string.
592592

@@ -684,7 +684,7 @@ There was some other error. The `HResult` property may provide more information.
684684
.NET Framework only: <paramref name="name" /> is longer than MAX_PATH (260 characters).</exception>
685685
<exception cref="T:System.ArgumentNullException">
686686
<paramref name="name" /> is <see langword="null" />.</exception>
687-
<exception cref="T:System.Threading.WaitHandleCannotBeOpenedException">A synchronization object with the provided <paramref name="name" /> cannot be opened. It may not exist, or a synchronization object of a different type might have the same name.</exception>
687+
<exception cref="T:System.Threading.WaitHandleCannotBeOpenedException">A synchronization object with the provided <paramref name="name" /> cannot be opened. It may not exist, or a synchronization object of a different type might have the same name. In some cases, this exception may be thrown for invalid names.</exception>
688688
<exception cref="T:System.IO.IOException">
689689
<paramref name="name" /> is invalid. This can be for various reasons, including some restrictions that may be placed by the operating system, such as an unknown prefix (note that the name and common prefixes "Global\" and "Local\" are case-sensitive), invalid characters, etc.
690690

@@ -945,7 +945,7 @@ There was some other error. The `HResult` property may provide more information.
945945
<param name="result">When this method returns, contains a <see cref="T:System.Threading.EventWaitHandle" /> object that represents the named synchronization event if the call succeeded, or <see langword="null" /> if the call failed. This parameter is treated as uninitialized.</param>
946946
<summary>Opens the specified named synchronization event, if it already exists, and returns a value that indicates whether the operation succeeded.</summary>
947947
<returns>
948-
<see langword="true" /> if the named synchronization event was opened successfully; otherwise, <see langword="false" />.</returns>
948+
<see langword="true" /> if the named synchronization event was opened successfully; otherwise, <see langword="false" />. In some cases, <see langword="false" /> may be returned for invalid names.</returns>
949949
<remarks>
950950
<format type="text/markdown"><![CDATA[
951951
@@ -1021,7 +1021,7 @@ There was some other error. The `HResult` property may provide more information.
10211021
<param name="result">When this method returns, contains a <see cref="T:System.Threading.EventWaitHandle" /> object that represents the named synchronization event 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 synchronization event, if it already exists, with the desired security access, and returns a value that indicates whether the operation succeeded.</summary>
10231023
<returns>
1024-
<see langword="true" /> if the named synchronization event was opened successfully; otherwise, <see langword="false" />.</returns>
1024+
<see langword="true" /> if the named synchronization event was opened successfully; otherwise, <see langword="false" />. In some cases, <see langword="false" /> may be returned for invalid names.</returns>
10251025
<remarks>
10261026
<format type="text/markdown"><![CDATA[
10271027

xml/System.Threading/Mutex.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ There was some other error. The `HResult` property may provide more information.
699699
.NET Framework only: <paramref name="name" /> is longer than MAX_PATH (260 characters).</exception>
700700
<exception cref="T:System.ArgumentNullException">
701701
<paramref name="name" /> is <see langword="null" />.</exception>
702-
<exception cref="T:System.Threading.WaitHandleCannotBeOpenedException">A synchronization object with the provided <paramref name="name" /> cannot be created. A synchronization object of a different type might have the same name.</exception>
702+
<exception cref="T:System.Threading.WaitHandleCannotBeOpenedException">A synchronization object with the provided <paramref name="name" /> cannot be created. A synchronization object of a different type might have the same name. In some cases, this exception may be thrown for invalid names.</exception>
703703
<exception cref="T:System.IO.IOException">
704704
<paramref name="name" /> is invalid. This can be for various reasons, including some restrictions that may be placed by the operating system, such as an unknown prefix (note that the name and common prefixes "Global\" and "Local\" are case-sensitive), invalid characters, etc.
705705

@@ -790,7 +790,7 @@ There was some other error. The `HResult` property may provide more information.
790790
.NET Framework only: <paramref name="name" /> is longer than MAX_PATH (260 characters).</exception>
791791
<exception cref="T:System.ArgumentNullException">
792792
<paramref name="name" /> is <see langword="null" />.</exception>
793-
<exception cref="T:System.Threading.WaitHandleCannotBeOpenedException">A synchronization object with the provided <paramref name="name" /> cannot be created. A synchronization object of a different type might have the same name.</exception>
793+
<exception cref="T:System.Threading.WaitHandleCannotBeOpenedException">A synchronization object with the provided <paramref name="name" /> cannot be created. A synchronization object of a different type might have the same name. In some cases, this exception may be thrown for invalid names.</exception>
794794
<exception cref="T:System.IO.IOException">
795795
<paramref name="name" /> is invalid. This can be for various reasons, including some restrictions that may be placed by the operating system, such as an unknown prefix (note that the name and common prefixes "Global\" and "Local\" are case-sensitive), invalid characters, etc.
796796

@@ -1006,7 +1006,7 @@ There was some other error. The `HResult` property may provide more information.
10061006
<param name="result">When this method returns, contains a <see cref="T:System.Threading.Mutex" /> object that represents the named mutex if the call succeeded, or <see langword="null" /> if the call failed. This parameter is treated as uninitialized.</param>
10071007
<summary>Opens the specified named mutex, if it already exists, and returns a value that indicates whether the operation succeeded.</summary>
10081008
<returns>
1009-
<see langword="true" /> if the named mutex was opened successfully; otherwise, <see langword="false" />.</returns>
1009+
<see langword="true" /> if the named mutex was opened successfully; otherwise, <see langword="false" />. In some cases, <see langword="false" /> may be returned for invalid names.</returns>
10101010
<remarks>
10111011
<format type="text/markdown"><![CDATA[
10121012
@@ -1084,7 +1084,7 @@ There was some other error. The `HResult` property may provide more information.
10841084
<param name="result">When this method returns, contains a <see cref="T:System.Threading.Mutex" /> object that represents the named mutex if the call succeeded, or <see langword="null" /> if the call failed. This parameter is treated as uninitialized.</param>
10851085
<summary>Opens the specified named mutex, if it already exists, with the desired security access, and returns a value that indicates whether the operation succeeded.</summary>
10861086
<returns>
1087-
<see langword="true" /> if the named mutex was opened successfully; otherwise, <see langword="false" />.</returns>
1087+
<see langword="true" /> if the named mutex was opened successfully; otherwise, <see langword="false" />. In some cases, <see langword="false" /> may be returned for invalid names.</returns>
10881088
<remarks>
10891089
<format type="text/markdown"><![CDATA[
10901090

xml/System.Threading/Semaphore.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ There was some other error. The `HResult` property may provide more information.
622622
.NET Framework only: <paramref name="name" /> is longer than MAX_PATH (260 characters).</exception>
623623
<exception cref="T:System.ArgumentNullException">
624624
<paramref name="name" /> is <see langword="null" />.</exception>
625-
<exception cref="T:System.Threading.WaitHandleCannotBeOpenedException">A synchronization object with the provided <paramref name="name" /> cannot be created. A synchronization object of a different type might have the same name.</exception>
625+
<exception cref="T:System.Threading.WaitHandleCannotBeOpenedException">A synchronization object with the provided <paramref name="name" /> cannot be created. A synchronization object of a different type might have the same name. In some cases, this exception may be thrown for invalid names.</exception>
626626
<exception cref="T:System.IO.IOException">
627627
<paramref name="name" /> is invalid. This can be for various reasons, including some restrictions that may be placed by the operating system, such as an unknown prefix (note that the name and common prefixes "Global\" and "Local\" are case-sensitive), invalid characters, etc.
628628

@@ -706,7 +706,7 @@ There was some other error. The `HResult` property may provide more information.
706706
.NET Framework only: <paramref name="name" /> is longer than MAX_PATH (260 characters).</exception>
707707
<exception cref="T:System.ArgumentNullException">
708708
<paramref name="name" /> is <see langword="null" />.</exception>
709-
<exception cref="T:System.Threading.WaitHandleCannotBeOpenedException">A synchronization object with the provided <paramref name="name" /> cannot be created. A synchronization object of a different type might have the same name.</exception>
709+
<exception cref="T:System.Threading.WaitHandleCannotBeOpenedException">A synchronization object with the provided <paramref name="name" /> cannot be created. A synchronization object of a different type might have the same name. In some cases, this exception may be thrown for invalid names.</exception>
710710
<exception cref="T:System.IO.IOException">
711711
<paramref name="name" /> is invalid. This can be for various reasons, including some restrictions that may be placed by the operating system, such as an unknown prefix (note that the name and common prefixes "Global\" and "Local\" are case-sensitive), invalid characters, etc.
712712

@@ -1016,7 +1016,7 @@ There was some other error. The `HResult` property may provide more information.
10161016
<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>
10171017
<summary>Opens the specified named semaphore, if it already exists, and returns a value that indicates whether the operation succeeded.</summary>
10181018
<returns>
1019-
<see langword="true" /> if the named semaphore was opened successfully; otherwise, <see langword="false" />.</returns>
1019+
<see langword="true" /> if the named semaphore was opened successfully; otherwise, <see langword="false" />. In some cases, <see langword="false" /> may be returned for invalid names.</returns>
10201020
<remarks>
10211021
<format type="text/markdown"><![CDATA[
10221022
@@ -1084,7 +1084,7 @@ There was some other error. The `HResult` property may provide more information.
10841084
<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>
10851085
<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>
10861086
<returns>
1087-
<see langword="true" /> if the named semaphore was opened successfully; otherwise, <see langword="false" />.</returns>
1087+
<see langword="true" /> if the named semaphore was opened successfully; otherwise, <see langword="false" />. In some cases, <see langword="false" /> may be returned for invalid names.</returns>
10881088
<remarks>
10891089
<format type="text/markdown"><![CDATA[
10901090

0 commit comments

Comments
 (0)