mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-25 19:18:01 +02:00
Update Thread.bf
This commit is contained in:
parent
f1a275d6ef
commit
c6b2aa4b27
1 changed files with 19 additions and 9 deletions
|
@ -19,7 +19,7 @@ namespace System.Threading
|
|||
|
||||
private Object mThreadStartArg;
|
||||
|
||||
bool mAutoDelete;
|
||||
bool mAutoDelete = true;
|
||||
bool mJoinOnDelete;
|
||||
|
||||
static Monitor sMonitor = new .() ~ delete _;
|
||||
|
@ -239,21 +239,31 @@ namespace System.Threading
|
|||
}
|
||||
}
|
||||
|
||||
public void Start()
|
||||
{
|
||||
StartInternal();
|
||||
}
|
||||
|
||||
public void Start(bool autoDelete = true)
|
||||
{
|
||||
mAutoDelete = autoDelete;
|
||||
StartInternal();
|
||||
mAutoDelete = autoDelete;
|
||||
Start();
|
||||
}
|
||||
|
||||
public void Start(Object parameter)
|
||||
{
|
||||
if (mDelegate is ThreadStart)
|
||||
{
|
||||
Runtime.FatalError();
|
||||
}
|
||||
mThreadStartArg = parameter;
|
||||
StartInternal();
|
||||
}
|
||||
|
||||
public void Start(Object parameter, bool autoDelete = true)
|
||||
{
|
||||
mAutoDelete = autoDelete;
|
||||
if (mDelegate is ThreadStart)
|
||||
{
|
||||
Runtime.FatalError();
|
||||
}
|
||||
mThreadStartArg = parameter;
|
||||
StartInternal();
|
||||
Start(parameter);
|
||||
}
|
||||
|
||||
#if BF_PLATFORM_WINDOWS && !BF_RUNTIME_DISABLE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue