-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Revised ManualResetEvent remarks #1739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,15 +48,15 @@ | |
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unrelated to your PR: The type description, "Provides a slimmed down version of ManualResetEvent", isn't helpful. Could you expand it by adding "to represent a thread synchronization event that, when signaled, must be reset manually."? |
||
|
|
||
| ## Examples | ||
| The following example shows how to use a <xref:System.Threading.ManualResetEventSlim>. For more information about the use of `SpinCount` and other best practices concerning the use of this type, see [ManualResetEvent and ManualResetEventSlim](~/docs/standard/threading/manualresetevent-and-manualreseteventslim.md). | ||
| The following example shows how to use a <xref:System.Threading.ManualResetEventSlim>. | ||
|
|
||
| [!code-csharp[System.Threading.ManualResetEventSlim#01](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.threading.manualreseteventslim/cs/mres.cs#01)] | ||
| [!code-vb[System.Threading.ManualResetEventSlim#01](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.threading.manualreseteventslim/vb/mres.vb#01)] | ||
|
|
||
| ]]></format> | ||
| </remarks> | ||
| <threadsafe>All public and protected members of <see cref="T:System.Threading.ManualResetEventSlim" /> are thread-safe and may be used concurrently from multiple threads, with the exception of Dispose, which must only be used when all other operations on the <see cref="T:System.Threading.ManualResetEventSlim" /> have completed, and Reset, which should only be used when no other threads are accessing the event.</threadsafe> | ||
| <related type="Article" href="~/docs/standard/threading/manualresetevent-and-manualreseteventslim.md">ManualResetEvent and ManualResetEventSlim</related> | ||
| <related type="Article" href="~/docs/standard/threading/overview-of-synchronization-primitives.md">Overview of synchronization primitives</related> | ||
| </Docs> | ||
| <Members> | ||
| <MemberGroup MemberName=".ctor"> | ||
|
|
@@ -68,7 +68,7 @@ | |
| </AssemblyInfo> | ||
| <Docs> | ||
| <summary>Initializes a new instance of the <see cref="T:System.Threading.ManualResetEventSlim" /> class.</summary> | ||
| <related type="Article" href="~/docs/standard/threading/manualresetevent-and-manualreseteventslim.md">ManualResetEvent and ManualResetEventSlim</related> | ||
| <related type="Article" href="~/docs/standard/threading/overview-of-synchronization-primitives.md">Overview of synchronization primitives</related> | ||
| </Docs> | ||
| </MemberGroup> | ||
| <Member MemberName=".ctor"> | ||
|
|
@@ -98,7 +98,7 @@ | |
| <Docs> | ||
| <summary>Initializes a new instance of the <see cref="T:System.Threading.ManualResetEventSlim" /> class with an initial state of nonsignaled.</summary> | ||
| <remarks>To be added.</remarks> | ||
| <related type="Article" href="~/docs/standard/threading/manualresetevent-and-manualreseteventslim.md">ManualResetEvent and ManualResetEventSlim</related> | ||
| <related type="Article" href="~/docs/standard/threading/overview-of-synchronization-primitives.md">Overview of synchronization primitives</related> | ||
| </Docs> | ||
| </Member> | ||
| <Member MemberName=".ctor"> | ||
|
|
@@ -132,7 +132,7 @@ | |
| <param name="initialState">true to set the initial state signaled; false to set the initial state to nonsignaled.</param> | ||
| <summary>Initializes a new instance of the <see cref="T:System.Threading.ManualResetEventSlim" /> class with a Boolean value indicating whether to set the intial state to signaled.</summary> | ||
| <remarks>To be added.</remarks> | ||
| <related type="Article" href="~/docs/standard/threading/manualresetevent-and-manualreseteventslim.md">ManualResetEvent and ManualResetEventSlim</related> | ||
| <related type="Article" href="~/docs/standard/threading/overview-of-synchronization-primitives.md">Overview of synchronization primitives</related> | ||
| </Docs> | ||
| </Member> | ||
| <Member MemberName=".ctor"> | ||
|
|
@@ -170,7 +170,7 @@ | |
| <remarks>To be added.</remarks> | ||
| <exception cref="T:System.ArgumentOutOfRangeException"> | ||
| <paramref name="spinCount" /> is less than 0 or greater than the maximum allowed value.</exception> | ||
| <related type="Article" href="~/docs/standard/threading/manualresetevent-and-manualreseteventslim.md">ManualResetEvent and ManualResetEventSlim</related> | ||
| <related type="Article" href="~/docs/standard/threading/overview-of-synchronization-primitives.md">Overview of synchronization primitives</related> | ||
| </Docs> | ||
| </Member> | ||
| <MemberGroup MemberName="Dispose"> | ||
|
|
@@ -182,7 +182,7 @@ | |
| </AssemblyInfo> | ||
| <Docs> | ||
| <summary>Releases resources used by the current instance of the <see cref="T:System.Threading.ManualResetEventSlim" /> class.</summary> | ||
| <related type="Article" href="~/docs/standard/threading/manualresetevent-and-manualreseteventslim.md">ManualResetEvent and ManualResetEventSlim</related> | ||
| <related type="Article" href="~/docs/standard/threading/overview-of-synchronization-primitives.md">Overview of synchronization primitives</related> | ||
| </Docs> | ||
| </MemberGroup> | ||
| <Member MemberName="Dispose"> | ||
|
|
@@ -231,7 +231,7 @@ | |
|
|
||
| ]]></format> | ||
| </remarks> | ||
| <related type="Article" href="~/docs/standard/threading/manualresetevent-and-manualreseteventslim.md">ManualResetEvent and ManualResetEventSlim</related> | ||
| <related type="Article" href="~/docs/standard/threading/overview-of-synchronization-primitives.md">Overview of synchronization primitives</related> | ||
| </Docs> | ||
| </Member> | ||
| <Member MemberName="Dispose"> | ||
|
|
@@ -275,7 +275,7 @@ | |
|
|
||
| ]]></format> | ||
| </remarks> | ||
| <related type="Article" href="~/docs/standard/threading/manualresetevent-and-manualreseteventslim.md">ManualResetEvent and ManualResetEventSlim</related> | ||
| <related type="Article" href="~/docs/standard/threading/overview-of-synchronization-primitives.md">Overview of synchronization primitives</related> | ||
| </Docs> | ||
| </Member> | ||
| <Member MemberName="IsSet"> | ||
|
|
@@ -309,7 +309,7 @@ | |
| <summary>Gets whether the event is set.</summary> | ||
| <value>true if the event has is set; otherwise, false.</value> | ||
| <remarks>To be added.</remarks> | ||
| <related type="Article" href="~/docs/standard/threading/manualresetevent-and-manualreseteventslim.md">ManualResetEvent and ManualResetEventSlim</related> | ||
| <related type="Article" href="~/docs/standard/threading/overview-of-synchronization-primitives.md">Overview of synchronization primitives</related> | ||
| </Docs> | ||
| </Member> | ||
| <Member MemberName="Reset"> | ||
|
|
@@ -351,7 +351,7 @@ | |
| ]]></format> | ||
| </remarks> | ||
| <exception cref="T:System.ObjectDisposedException">The object has already been disposed.</exception> | ||
| <related type="Article" href="~/docs/standard/threading/manualresetevent-and-manualreseteventslim.md">ManualResetEvent and ManualResetEventSlim</related> | ||
| <related type="Article" href="~/docs/standard/threading/overview-of-synchronization-primitives.md">Overview of synchronization primitives</related> | ||
| </Docs> | ||
| </Member> | ||
| <Member MemberName="Set"> | ||
|
|
@@ -385,7 +385,7 @@ | |
| <Docs> | ||
| <summary>Sets the state of the event to signaled, which allows one or more threads waiting on the event to proceed.</summary> | ||
| <remarks>To be added.</remarks> | ||
| <related type="Article" href="~/docs/standard/threading/manualresetevent-and-manualreseteventslim.md">ManualResetEvent and ManualResetEventSlim</related> | ||
| <related type="Article" href="~/docs/standard/threading/overview-of-synchronization-primitives.md">Overview of synchronization primitives</related> | ||
| </Docs> | ||
| </Member> | ||
| <Member MemberName="SpinCount"> | ||
|
|
@@ -419,7 +419,7 @@ | |
| <summary>Gets the number of spin waits that will occur before falling back to a kernel-based wait operation.</summary> | ||
| <value>Returns the number of spin waits that will occur before falling back to a kernel-based wait operation.</value> | ||
| <remarks>To be added.</remarks> | ||
| <related type="Article" href="~/docs/standard/threading/manualresetevent-and-manualreseteventslim.md">ManualResetEvent and ManualResetEventSlim</related> | ||
| <related type="Article" href="~/docs/standard/threading/overview-of-synchronization-primitives.md">Overview of synchronization primitives</related> | ||
| </Docs> | ||
| </Member> | ||
| <MemberGroup MemberName="Wait"> | ||
|
|
@@ -431,7 +431,7 @@ | |
| </AssemblyInfo> | ||
| <Docs> | ||
| <summary>Blocks the current thread until the current <see cref="T:System.Threading.ManualResetEventSlim" /> is set.</summary> | ||
| <related type="Article" href="~/docs/standard/threading/manualresetevent-and-manualreseteventslim.md">ManualResetEvent and ManualResetEventSlim</related> | ||
| <related type="Article" href="~/docs/standard/threading/overview-of-synchronization-primitives.md">Overview of synchronization primitives</related> | ||
| </Docs> | ||
| </MemberGroup> | ||
| <Member MemberName="Wait"> | ||
|
|
@@ -474,7 +474,7 @@ | |
| </remarks> | ||
| <exception cref="T:System.InvalidOperationException">The maximum number of waiters has been exceeded.</exception> | ||
| <exception cref="T:System.ObjectDisposedException">The object has already been disposed.</exception> | ||
| <related type="Article" href="~/docs/standard/threading/manualresetevent-and-manualreseteventslim.md">ManualResetEvent and ManualResetEventSlim</related> | ||
| <related type="Article" href="~/docs/standard/threading/overview-of-synchronization-primitives.md">Overview of synchronization primitives</related> | ||
| </Docs> | ||
| </Member> | ||
| <Member MemberName="Wait"> | ||
|
|
@@ -517,7 +517,7 @@ | |
| <paramref name="millisecondsTimeout" /> is a negative number other than -1, which represents an infinite time-out.</exception> | ||
| <exception cref="T:System.InvalidOperationException">The maximum number of waiters has been exceeded.</exception> | ||
| <exception cref="T:System.ObjectDisposedException">The object has already been disposed.</exception> | ||
| <related type="Article" href="~/docs/standard/threading/manualresetevent-and-manualreseteventslim.md">ManualResetEvent and ManualResetEventSlim</related> | ||
| <related type="Article" href="~/docs/standard/threading/overview-of-synchronization-primitives.md">Overview of synchronization primitives</related> | ||
| </Docs> | ||
| </Member> | ||
| <Member MemberName="Wait"> | ||
|
|
@@ -564,7 +564,7 @@ | |
| <exception cref="T:System.OperationCanceledException"> | ||
| <paramref name="cancellationToken" /> was canceled.</exception> | ||
| <exception cref="T:System.ObjectDisposedException">The object has already been disposed or the <see cref="T:System.Threading.CancellationTokenSource" /> that created <paramref name="cancellationToken" /> has been disposed.</exception> | ||
| <related type="Article" href="~/docs/standard/threading/manualresetevent-and-manualreseteventslim.md">ManualResetEvent and ManualResetEventSlim</related> | ||
| <related type="Article" href="~/docs/standard/threading/overview-of-synchronization-primitives.md">Overview of synchronization primitives</related> | ||
| </Docs> | ||
| </Member> | ||
| <Member MemberName="Wait"> | ||
|
|
@@ -611,7 +611,7 @@ | |
| The number of milliseconds in <paramref name="timeout" /> is greater than <see cref="F:System.Int32.MaxValue" />.</exception> | ||
| <exception cref="T:System.InvalidOperationException">The maximum number of waiters has been exceeded.</exception> | ||
| <exception cref="T:System.ObjectDisposedException">The object has already been disposed.</exception> | ||
| <related type="Article" href="~/docs/standard/threading/manualresetevent-and-manualreseteventslim.md">ManualResetEvent and ManualResetEventSlim</related> | ||
| <related type="Article" href="~/docs/standard/threading/overview-of-synchronization-primitives.md">Overview of synchronization primitives</related> | ||
| </Docs> | ||
| </Member> | ||
| <Member MemberName="Wait"> | ||
|
|
@@ -657,7 +657,7 @@ | |
| <paramref name="millisecondsTimeout" /> is a negative number other than -1, which represents an infinite time-out.</exception> | ||
| <exception cref="T:System.InvalidOperationException">The maximum number of waiters has been exceeded.</exception> | ||
| <exception cref="T:System.ObjectDisposedException">The object has already been disposed or the <see cref="T:System.Threading.CancellationTokenSource" /> that created <paramref name="cancellationToken" /> has been disposed.</exception> | ||
| <related type="Article" href="~/docs/standard/threading/manualresetevent-and-manualreseteventslim.md">ManualResetEvent and ManualResetEventSlim</related> | ||
| <related type="Article" href="~/docs/standard/threading/overview-of-synchronization-primitives.md">Overview of synchronization primitives</related> | ||
| </Docs> | ||
| </Member> | ||
| <Member MemberName="Wait"> | ||
|
|
@@ -707,7 +707,7 @@ | |
| The number of milliseconds in <paramref name="timeout" /> is greater than <see cref="F:System.Int32.MaxValue" />.</exception> | ||
| <exception cref="T:System.InvalidOperationException">The maximum number of waiters has been exceeded.</exception> | ||
| <exception cref="T:System.ObjectDisposedException">The object has already been disposed or the <see cref="T:System.Threading.CancellationTokenSource" /> that created <paramref name="cancellationToken" /> has been disposed.</exception> | ||
| <related type="Article" href="~/docs/standard/threading/manualresetevent-and-manualreseteventslim.md">ManualResetEvent and ManualResetEventSlim</related> | ||
| <related type="Article" href="~/docs/standard/threading/overview-of-synchronization-primitives.md">Overview of synchronization primitives</related> | ||
| </Docs> | ||
| </Member> | ||
| <Member MemberName="WaitHandle"> | ||
|
|
@@ -748,7 +748,7 @@ | |
|
|
||
| ]]></format> | ||
| </remarks> | ||
| <related type="Article" href="~/docs/standard/threading/manualresetevent-and-manualreseteventslim.md">ManualResetEvent and ManualResetEventSlim</related> | ||
| <related type="Article" href="~/docs/standard/threading/overview-of-synchronization-primitives.md">Overview of synchronization primitives</related> | ||
| </Docs> | ||
| </Member> | ||
| </Members> | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.