melonvpn-original-cs/MelonVPNCore/ThreadWrapper.cs
2020-09-22 23:10:16 +01:00

22 lines
429 B
C#

using System.Threading;
namespace MelonVPNCore
{
public class ThreadWrapper
{
private Thread wrapper;
public ThreadWrapper(ThreadStart action)
{
wrapper = new Thread(action)
{
IsBackground = true
};
wrapper.Start();
}
public void Join() => wrapper.Join();
public void Kill() => wrapper.Abort();
}
}