Created
October 6, 2017 15:37
-
-
Save EgorBo/81110d1add96440ca716d30c7071eacf 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
using System.Threading; | |
namespace ConsoleApp | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var t = new Thread(() => { }); | |
t.IsBackground = true; | |
t.Start(); | |
t.Join(30000); | |
t.IsBackground = false; | |
//.NET: System.Threading.ThreadStateException: Thread is dead; state cannot be accessed: | |
// Mono: no exception | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment