Commit 766ff1ed authored by Aaron Jacobs's avatar Aaron Jacobs

Connection.recordCancelFunc

parent d22c1c64
......@@ -96,7 +96,16 @@ func (c *Connection) log(
// LOCKS_EXCLUDED(c.mu)
func (c *Connection) recordCancelFunc(
reqID bazilfuse.RequestID,
f func())
f func()) {
c.mu.Lock()
defer c.mu.Unlock()
if _, ok := c.cancelFuncs[reqID]; ok {
panic(fmt.Sprintf("Already have cancel func for request %v", reqID))
}
c.cancelFuncs[reqID] = f
}
// Set up state for an op that is about to be returned to the user, given its
// bazilfuse request ID.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment