lnd/fn
Elle Mouton f99cabf7b4
fn: rework the ContextGuard and add tests
In this commit, the ContextGuard struct is re-worked such that the
context that its new main WithCtx method provides is cancelled in sync
with a parent context being cancelled or with it's quit channel being
cancelled. Tests are added to assert the behaviour. In order for the
close of the quit channel to be consistent with the cancelling of the
derived context, the quit channel _must_ be contained internal to the
ContextGuard so that callers are only able to close the channel via the
exposed Quit method which will then take care to first cancel any
derived context that depend on the quit channel before returning.
2024-12-13 10:44:03 +02:00
..
conc_queue.go fn: remove lru dependency 2024-07-10 17:06:04 -07:00
context_guard.go fn: rework the ContextGuard and add tests 2024-12-13 10:44:03 +02:00
context_guard_test.go fn: rework the ContextGuard and add tests 2024-12-13 10:44:03 +02:00
either.go fn: breaking - polish Either API 2024-11-06 17:32:58 -07:00
either_test.go fn: breaking - improve naming of option api functions 2024-11-06 17:32:59 -07:00
events.go fn: add new EventPublisher event pub/sub system 2024-01-23 19:09:39 -08:00
fn.go fn: breaking - fix type variables for better inference 2024-11-06 16:50:06 -07:00
func.go fn: add deep copy interface. 2024-12-10 14:10:33 +01:00
go.mod fn: update fn/go.mod to v2 2024-11-20 10:28:55 -07:00
go.sum fn: remove lru dependency 2024-07-10 17:06:04 -07:00
goroutine_manager.go fn: Remove ctx from GoroutineManager constructor 2024-12-12 09:32:57 +02:00
goroutine_manager_test.go fn: Remove ctx from GoroutineManager constructor 2024-12-12 09:32:57 +02:00
list.go fn: add Filter to List 2024-09-26 14:24:36 -06:00
list_test.go fn: breaking - reverse argument order in slice funcs 2024-11-06 17:32:50 -07:00
map.go fn: Added map functions 2024-05-10 09:55:16 +01:00
map_test.go fn: Added map functions 2024-05-10 09:55:16 +01:00
option.go Merge pull request #8985 from ProofOfKeags/fn/collect-results 2024-11-07 18:50:57 +01:00
option_test.go fn: add transpositions for Option and Result 2024-11-06 16:40:36 -07:00
predicate.go fn: add predicate combinators for && and || 2024-06-03 12:24:02 -07:00
queue.go fn: add basic generic queue 2024-01-23 19:09:45 -08:00
recv.go fn: add basic generic chan recv utility funcs 2024-01-23 19:09:47 -08:00
req.go fn: harden and refine the Req[I,O] API. 2024-07-31 12:59:10 -07:00
result.go fn: breaking - make or else functions accept error argument 2024-11-06 17:32:59 -07:00
result_test.go fn: add Sink to Result 2024-11-06 16:50:02 -07:00
send.go fn: add SendOrQuit 2024-01-23 19:09:50 -08:00
set.go fn: Add Size and IsEmpty methods to Set 2024-10-04 01:07:47 +02:00
slice.go fn: breaking - reverse argument order in slice funcs 2024-11-06 17:32:50 -07:00
slice_test.go fn: breaking - rename ChainOption to FlatMapOption for consistency 2024-11-06 17:32:59 -07:00
t2.go fn: add fundamental functional primitives 2024-07-10 14:42:11 -07:00
tests.go fn: add Guard test helper 2024-12-13 10:44:03 +02:00