mirror of
https://github.com/digital-jellyfish/Virtu.git
synced 2024-11-24 10:30:55 +00:00
24 lines
434 B
C#
24 lines
434 B
C#
|
using System;
|
|||
|
using System.Threading;
|
|||
|
|
|||
|
namespace Jellyfish.Library
|
|||
|
{
|
|||
|
public static class ThreadExtensions
|
|||
|
{
|
|||
|
public static void IsAliveJoin(this Thread thread)
|
|||
|
{
|
|||
|
if (thread == null)
|
|||
|
{
|
|||
|
throw new ArgumentNullException("thread");
|
|||
|
}
|
|||
|
|
|||
|
#if !XBOX
|
|||
|
if (thread.IsAlive)
|
|||
|
#endif
|
|||
|
{
|
|||
|
thread.Join();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|