20 writes to m_stateFlags
mscorlib (20)
system\threading\Tasks\Future.cs (2)
483
Interlocked.Exchange(ref
m_stateFlags
, m_stateFlags | TASK_STATE_RAN_TO_COMPLETION);
517
m_stateFlags
|= TASK_STATE_RAN_TO_COMPLETION;
system\threading\Tasks\Task.cs (17)
321
m_stateFlags
= TASK_STATE_CANCELED | TASK_STATE_CANCELLATIONACKNOWLEDGED | optionFlags;
328
m_stateFlags
= TASK_STATE_RAN_TO_COMPLETION | optionFlags;
345
m_stateFlags
= TASK_STATE_WAITINGFORACTIVATION | (int)InternalTaskOptions.PromiseTask;
639
m_stateFlags
= tmpFlags; // one write to the volatile m_stateFlags instead of two when setting the above options
820
if (Interlocked.CompareExchange(ref
m_stateFlags
, oldFlags | newBits, oldFlags) == oldFlags)
835
if (Interlocked.CompareExchange(ref
m_stateFlags
, oldFlags | newBits, oldFlags) == oldFlags)
871
if (Interlocked.CompareExchange(ref
m_stateFlags
, newFlags, oldFlags) == oldFlags) break;
980
m_stateFlags
|= Task.TASK_STATE_TASKSCHEDULED_WAS_FIRED;
1775
m_stateFlags
|= TASK_STATE_EXECUTIONCONTEXT_IS_NULL;
1896
m_stateFlags
|= TASK_STATE_DISPOSED;
1928
m_stateFlags
|= TASK_STATE_STARTED;
2175
m_stateFlags
|= TASK_STATE_EXCEPTIONOBSERVEDBYPARENT;
2323
Interlocked.Exchange(ref
m_stateFlags
, m_stateFlags | completionState);
2751
m_stateFlags
|= TASK_STATE_DELEGATE_INVOKED;
2760
int prevState = Interlocked.Exchange(ref
m_stateFlags
, m_stateFlags | TASK_STATE_CANCELED);
3547
Interlocked.Exchange(ref
m_stateFlags
, m_stateFlags | TASK_STATE_CANCELED);
3578
m_stateFlags
|= TASK_STATE_CANCELLATIONACKNOWLEDGED;
system\threading\Tasks\TaskContinuation.cs (1)
257
task.
m_stateFlags
|= Task.TASK_STATE_STARTED;
34 references to m_stateFlags
mscorlib (34)
system\threading\Tasks\Future.cs (1)
483
Interlocked.Exchange(ref m_stateFlags,
m_stateFlags
| TASK_STATE_RAN_TO_COMPLETION);
system\threading\Tasks\Task.cs (32)
630
Contract.Assert(
m_stateFlags
== 0, "TaskConstructorCore: non-zero m_stateFlags");
794
int stateFlags =
m_stateFlags
; // "cast away" volatility to enable inlining of OptionsMethod
818
int oldFlags =
m_stateFlags
;
833
oldFlags =
m_stateFlags
;
869
int oldFlags =
m_stateFlags
;
918
return (
m_stateFlags
& (Task.TASK_STATE_WAIT_COMPLETION_NOTIFICATION | Task.TASK_STATE_RAN_TO_COMPLETION))
947
get { return (
m_stateFlags
& TASK_STATE_WAIT_COMPLETION_NOTIFICATION) != 0; }
978
if (etwLog.IsEnabled() && (
m_stateFlags
& Task.TASK_STATE_TASKSCHEDULED_WAS_FIRED) == 0)
1074
int flags =
m_stateFlags
;
1179
int flags =
m_stateFlags
;
1264
Contract.Assert((
m_stateFlags
& TASK_STATE_CANCELED) != 0, "Task.RunSynchronously: expected TASK_STATE_CANCELED to be set");
1433
int sf =
m_stateFlags
;
1464
return (
m_stateFlags
& (TASK_STATE_CANCELED | TASK_STATE_FAULTED)) == TASK_STATE_CANCELED;
1535
get { return (
m_stateFlags
& TASK_STATE_CANCELLATIONACKNOWLEDGED) != 0; }
1552
int stateFlags =
m_stateFlags
; // enable inlining of IsCompletedMethod by "cast"ing away the volatility
1567
get { return (
m_stateFlags
& TASK_STATE_COMPLETED_MASK) == TASK_STATE_RAN_TO_COMPLETION; }
1597
bool isDisposed = (
m_stateFlags
& TASK_STATE_DISPOSED) != 0;
1746
return ((
m_stateFlags
& TASK_STATE_FAULTED) != 0);
1759
if ((
m_stateFlags
& TASK_STATE_EXECUTIONCONTEXT_IS_NULL) == TASK_STATE_EXECUTIONCONTEXT_IS_NULL)
1915
Contract.Assert((
m_stateFlags
& TASK_STATE_STARTED) == 0, "task has already started");
2188
return (
m_stateFlags
& TASK_STATE_EXCEPTIONOBSERVEDBYPARENT) != 0;
2199
return (
m_stateFlags
& TASK_STATE_DELEGATE_INVOKED) != 0;
2323
Interlocked.Exchange(ref m_stateFlags,
m_stateFlags
| completionState);
2356
&& (((TaskCreationOptions)(
m_stateFlags
& OptionsMask)) & TaskCreationOptions.AttachedToParent) != 0)
2760
int prevState = Interlocked.Exchange(ref m_stateFlags,
m_stateFlags
| TASK_STATE_CANCELED);
3187
Contract.Assert((
m_stateFlags
& TASK_STATE_FAULTED) == 0, "Task.Wait() completing when in Faulted state.");
3401
if ((
m_stateFlags
& TASK_STATE_STARTED) != 0)
3464
else if (!mustCleanup && (
m_stateFlags
& TASK_STATE_STARTED) == 0)
3541
Contract.Assert((
m_stateFlags
& (TASK_STATE_CANCELED | TASK_STATE_COMPLETION_RESERVED)) != 0, "Task.CancellationCleanupLogic(): Task not canceled or reserved.");
3547
Interlocked.Exchange(ref m_stateFlags,
m_stateFlags
| TASK_STATE_CANCELED);
3608
bool bCanInlineContinuations = !(((
m_stateFlags
& TASK_STATE_THREAD_WAS_ABORTED) != 0) ||
3610
((
m_stateFlags
& (int)TaskCreationOptions.RunContinuationsAsynchronously) != 0));
system\threading\Tasks\TaskContinuation.cs (1)
274
(task.
m_stateFlags
& Task.TASK_STATE_THREAD_WAS_ABORTED) != 0)) // this ensures TAEs from QueueTask will be wrapped in TSE