Short-circuit the fast path without locking
Evan Huus
9 years ago
62 | 62 |
}()
|
63 | 63 |
return x()
|
64 | 64 |
}()
|
|
65 |
|
|
66 |
if result == nil && panicValue == nil && state == closed {
|
|
67 |
// short-circuit the normal, success path without contending
|
|
68 |
// on the lock
|
|
69 |
return nil
|
|
70 |
}
|
65 | 71 |
|
66 | 72 |
b.processResult(result, panicValue)
|
67 | 73 |
|