Skip to content

Commit 5638fff

Browse files
author
electricessence
authored
Fixed improper use of Interlocked.CompareExchange.
1 parent e123770 commit 5638fff

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ActionRunner.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public CancellableTask Defer(TimeSpan delay, bool clearSchedule = true)
149149
if ((task = _task) == null)
150150
{
151151
task = Prepare();
152-
if (task == Interlocked.CompareExchange(ref _task, task, null))
152+
if (null == Interlocked.CompareExchange(ref _task, task, null))
153153
{
154154
task.Start(delay);
155155
}

0 commit comments

Comments
 (0)