mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 22:34:09 +02:00
Moving corlib files out of "System" directory into root
This commit is contained in:
parent
4cd58262e4
commit
7dbfd15292
179 changed files with 3 additions and 0 deletions
26
BeefLibs/corlib/src/Threading/CancellationTokenSource.bf
Normal file
26
BeefLibs/corlib/src/Threading/CancellationTokenSource.bf
Normal file
|
@ -0,0 +1,26 @@
|
|||
// This file contains portions of code released by Microsoft under the MIT license as part
|
||||
// of an open-sourcing initiative in 2014 of the C# core libraries.
|
||||
// The original source was submitted to https://github.com/Microsoft/referencesource
|
||||
|
||||
namespace System.Threading
|
||||
{
|
||||
class CancellationTokenSource
|
||||
{
|
||||
private const int CANNOT_BE_CANCELED = 0;
|
||||
private const int NOT_CANCELED = 1;
|
||||
private const int NOTIFYING = 2;
|
||||
private const int NOTIFYINGCOMPLETE = 3;
|
||||
|
||||
private volatile int m_state;
|
||||
|
||||
public bool IsCancellationRequested
|
||||
{
|
||||
get { return m_state >= NOTIFYING; }
|
||||
}
|
||||
|
||||
internal bool CanBeCanceled
|
||||
{
|
||||
get { return m_state != CANNOT_BE_CANCELED; }
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue