Skip to content

Commit 876798e

Browse files
committed
Delete irrelevant FIXME comment.
I noticed that there's nowhere where we actually hold locks on multiple Promise.states. So there's no need to even have a rule about this. I'd added the FIXME at some point when reading the comment about the invariant because it didn't seem right -- but it turns out it doesn't matter.
1 parent c434d9f commit 876798e

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

answer.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,6 @@ type Promise struct {
3333
// Next state is resolved.
3434
// - Resolved. Fulfill or Reject has finished.
3535

36-
// When acquiring multiple Promise.state mutexes, they must be acquired
37-
// in traversal order (i.e. p, then p.next, then p.next.next).
38-
//
39-
// FIXME: is the above traversal scheme sound? It depends on avoiding
40-
// cycles in the graph to prevent potential deadlocks, and it is not
41-
// clear to me(zenhack) that this is a safe assumption (I suspect it's
42-
// not).
4336
state mutex.Mutex[promiseState]
4437
}
4538

0 commit comments

Comments
 (0)