Skip to content

Conversation

@pkulikov
Copy link
Contributor

@pkulikov pkulikov commented Jan 30, 2019

Accompanies dotnet/docs#10233
/cc: @rpetrusha

Copy link

@rpetrusha rpetrusha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @pkulikov. This is a substantial improvement of the ManualResetEvents documentation. I've left some suggested changes, as well as a request for a change unrelated to your PR.

## Remarks
You can use this class for better performance than <xref:System.Threading.ManualResetEvent> when wait times are expected to be very short, and when the event does not cross a process boundary. <xref:System.Threading.ManualResetEventSlim> uses busy spinning for a short time while it waits for the event to become signaled. When wait times are short, spinning can be much less expensive than waiting by using wait handles. However, if the event does not become signaled within a certain period of time, <xref:System.Threading.ManualResetEventSlim> resorts to a regular event handle wait.

Choose a reason for hiding this comment

The 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."?

Ron Petrusha and others added 2 commits February 5, 2019 08:02
@pkulikov
Copy link
Contributor Author

pkulikov commented Feb 5, 2019

@rpetrusha thank you for review and suggestions. I've addressed all the feedback (also replaced the "slimmed down" words with "lightweight", as it looks to be more common in the docs so far).

@rpetrusha
Copy link

Thanks for the additional changes, @pkulikov. And "lightweight" is vastly superior to "slimmed down". I'll merge your PR now.

@rpetrusha rpetrusha merged commit 8f7551f into dotnet:master Feb 5, 2019
@pkulikov pkulikov deleted the manualresetevent-revisions branch February 5, 2019 22:41
@rpetrusha rpetrusha added this to the February 2019 milestone Feb 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants