Skip to content

Commit

Permalink
Delete irrelevant FIXME comment.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
zenhack committed May 12, 2023
1 parent c434d9f commit 876798e
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions answer.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@ type Promise struct {
// Next state is resolved.
// - Resolved. Fulfill or Reject has finished.

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

Expand Down

0 comments on commit 876798e

Please sign in to comment.