From 3cfbe3cd3f97635efbd2a35f6014e483fb9536ca Mon Sep 17 00:00:00 2001 From: vyzo Date: Thu, 30 Mar 2023 18:13:08 +0300 Subject: [PATCH] add comment about Signal unsoundness --- chain/vm/execution.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chain/vm/execution.go b/chain/vm/execution.go index dfa9d98d2..37abedb6d 100644 --- a/chain/vm/execution.go +++ b/chain/vm/execution.go @@ -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)