-
-
Save ThePhD/401bb4be200b30ef3bc5 to your computer and use it in GitHub Desktop.
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
/// <summary> | |
/// Gets a value indicating whether or not this | |
/// </summary> | |
public bool IsSynchronized | |
{ | |
get | |
{ | |
if (Monitor.TryEnter(this.syncobj)) | |
{ | |
Monitor.Exit(this.syncobj); | |
return true; | |
} | |
return false; | |
} | |
} | |
/// <summary> | |
/// Gets an object used for synchronization. | |
/// </summary> | |
public object SyncRoot | |
{ | |
get | |
{ | |
return this.syncobj; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment