mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
deefa3a9f1
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_test.go | ||
either.go | ||
events.go | ||
fn.go | ||
go.mod | ||
go.sum | ||
goroutine_manager_test.go | ||
goroutine_manager.go | ||
list_test.go | ||
list.go | ||
map_test.go | ||
map.go | ||
option.go | ||
predicate.go | ||
queue.go | ||
recv.go | ||
req.go | ||
result.go | ||
send.go | ||
set.go | ||
slice_test.go | ||
slice.go | ||
t2.go |