mirror of
https://github.com/lightningnetwork/lnd.git
synced 2026-08-17 13:06:14 +02:00
This adds the ContextGuard struct from the taproot-assets repository that has been in use there for a while. The context guard allows for easy creation of contexts that depend on a central wait group and quit channel. A context can either be created with a timeout and quit, meaning it will cancel either on reaching the timeout or when the central quit channel is closed. Or a context can be created to block and use a timeout, meaning it will _not_ cancel on quit but rather block the shutdown until it is completed (or times out). The third way is to create a context that just cancels on quit with no timeout. |
||
|---|---|---|
| .. | ||
| conc_queue.go | ||
| context_guard.go | ||
| either.go | ||
| either_test.go | ||
| events.go | ||
| fn.go | ||
| go.mod | ||
| go.sum | ||
| goroutine_manager.go | ||
| goroutine_manager_test.go | ||
| list.go | ||
| list_test.go | ||
| map.go | ||
| map_test.go | ||
| option.go | ||
| predicate.go | ||
| queue.go | ||
| recv.go | ||
| req.go | ||
| result.go | ||
| send.go | ||
| set.go | ||
| slice.go | ||
| slice_test.go | ||
| t2.go | ||