add comment about Signal unsoundness

This commit is contained in:
vyzo 2023-03-30 18:13:08 +03:00 committed by Maciej Witowski
parent 371028a42a
commit 3cfbe3cd3f

View File

@ -125,6 +125,8 @@ func (e *executionEnv) putToken(token *executionToken) {
e.available++
e.reserved += token.reserved
// Note: Signal is unsound, because a priority token could wake up a non-priority
// goroutnie and lead to deadlock. So Broadcast it must be.
e.cond.Broadcast()
metricsDown(metrics.VMExecutionRunning, token.lane)