Created
January 31, 2013 16:35
-
-
Save duarten/4684172 to your computer and use it in GitHub Desktop.
The no-lock deadlock (http://ericlippert.com/2013/01/31/the-no-lock-deadlock)
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
class C | |
{ | |
static C() | |
{ | |
// Let's run the initialization on another thread! | |
var thread = new System.Threading.Thread(Initialize); | |
thread.Start(); | |
thread.Join(); | |
} | |
static void Initialize() { } | |
static void Main() { } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment