Allow Task.interrupt to be called within a yieldLock.
This commit is contained in:
parent
03ffe70dc1
commit
b5ccb784a1
|
@ -491,7 +491,9 @@ final package class TaskFiber : Fiber {
|
|||
} else assert(() @trusted { return Thread.getThis(); } () is this.thread, "Interrupting tasks in different threads is not yet supported.");
|
||||
debug (VibeTaskLog) logTrace("Resuming task with interrupt flag.");
|
||||
m_interrupt = true;
|
||||
taskScheduler.switchTo(this.task);
|
||||
|
||||
auto defer = TaskFiber.getThis().m_yieldLockCount > 0 ? Yes.defer : No.defer;
|
||||
taskScheduler.switchTo(this.task, defer);
|
||||
}
|
||||
|
||||
void bumpTaskCounter()
|
||||
|
|
Loading…
Reference in a new issue