lnd/fn
Boris Nagaev 07c46680e9
fn/ContextGuard: use context.AfterFunc to wait
Simplifies context cancellation handling by using context.AfterFunc instead of a
goroutine to wait for context cancellation. This approach avoids the overhead of
a goroutine during the waiting period.

For ctxQuitUnsafe, since g.quit is closed only in the Quit method (which also
cancels all associated contexts), waiting on context cancellation ensures the
same behavior without unnecessary dependency on g.quit.

Added a test to ensure that the Create method does not launch any goroutines.
2025-01-02 10:38:26 -03:00
..
conc_queue.go fn: remove lru dependency 2024-07-10 17:06:04 -07:00
context_guard.go fn/ContextGuard: use context.AfterFunc to wait 2025-01-02 10:38:26 -03:00
context_guard_test.go fn/ContextGuard: use context.AfterFunc to wait 2025-01-02 10:38:26 -03: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
io.go fn: add synchronous write file 2024-12-16 11:16:00 -03:00
io_test.go fn: add synchronous write file 2024-12-16 11:16:00 -03: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 set copy method Copy 2024-12-18 15:17:23 -05: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