Created
September 6, 2015 10:36
-
-
Save angelovstanton/da9658f79670023d7c68 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
volatile bool shouldPartyContinue = true; | |
public static unsafe void Main(string[] args) | |
{ | |
Program firstDimension = new Program(); | |
Thread secondDimension = new Thread(firstDimension.StartPartyInAnotherDimension); | |
secondDimension.Start(firstDimension); | |
Thread.Sleep(5000); | |
firstDimension.shouldPartyContinue = false; | |
Console.WriteLine("Party Grand Finish"); | |
} | |
private void StartPartyInAnotherDimension(object input) | |
{ | |
Program currentDimensionInput = (Program)input; | |
Console.WriteLine("let the party begin"); | |
while (currentDimensionInput.shouldPartyContinue) | |
{ | |
} | |
Console.WriteLine("Party ends :("); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment