-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Manual thread safety in RedirectConsoleWriter
Initially, this delegated thread safety to a `SyncTextWriter`, but the object graph was hard to understand, so it was replaced with a has-a `SyncTextWriter` relationship, but this lost the timer-based call to `Flush()` to send the output to the client. The docs on `MethodImplOptions.Synchronized` also advise that it can be risky due to locking on the object itself, so manage the syncronization with an explicit lock object over the underlying `StringWriter` instead.
- Loading branch information
1 parent
3deec2f
commit 7310f74
Showing
2 changed files
with
258 additions
and
54 deletions.
There are no files selected for viewing
This file contains 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 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