Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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