MCPcopy Index your code

hub / github.com/sourcegraph/conc / functions

Functions112 in github.com/sourcegraph/conc

↓ 76 callersMethodGo
Go submits a task to be run in the pool. If all goroutines in the pool are busy, a call to Go() will block until the task can be started.
pool/pool.go:39
↓ 47 callersMethodWait
Wait cleans up spawned goroutines, propagating any panics that were raised by a tasks.
pool/pool.go:74
↓ 35 callersFunctionNew
New creates a new Pool.
pool/pool.go:11
↓ 26 callersMethodWithContext
WithContext converts the pool to a ContextPool for tasks that should run under the same context, such that they each respect shared cancellation. For
pool/pool.go:138
↓ 23 callersMethodWithMaxGoroutines
WithMaxGoroutines limits the number of goroutines in a pool. Defaults to unlimited. Panics if n < 1.
pool/pool.go:89
↓ 19 callersMethodWithErrors
WithErrors converts the pool to an ErrorPool so the submitted tasks can return errors.
pool/pool.go:117
↓ 18 callersMethodGo
Go spawns a new goroutine in the WaitGroup.
waitgroup.go:28
↓ 15 callersMethodTry
Try executes f, catching any panic it might spawn. It is safe to call from multiple goroutines simultaneously.
panics/panics.go:21
↓ 11 callersMethodRecovered
Recovered returns the value of the first panic caught by Try, or nil if no calls to Try panicked.
panics/panics.go:44
↓ 10 callersMethodGo
Go schedules a task to be run in the stream's pool. All submitted tasks will be executed concurrently in worker goroutines. Then, the callbacks return
stream/stream.go:62
↓ 9 callersMethodAsError
AsError casts the panic into an error implementation. The implementation is unwrappable with the cause of the panic, if the panic was provided one.
panics/panics.go:83
↓ 8 callersFunctionNew
New creates a new Stream with default settings.
stream/stream.go:13
↓ 7 callersMethodString
String renders a human-readable formatting of the panic.
panics/panics.go:77
↓ 6 callersFunctionMap
Map applies f to each element of input, returning the mapped result. Map always uses at most runtime.GOMAXPROCS goroutines. For a configurable gorout
iter/map.go:20
↓ 6 callersFunctionMapErr
MapErr applies f to each element of the input, returning the mapped result and a combined error of all returned errors. Map always uses at most runti
iter/map.go:40
↓ 6 callersMethodWithCancelOnError
WithCancelOnError configures the pool to cancel its context as soon as any task returns an error or panics. By default, the pool's context is not canc
pool/context_pool.go:78
↓ 5 callersFunctionForEach
ForEach executes f in parallel over each element in input. It is safe to mutate the input parameter, which makes it possible to map in place. ForEac
iter/iter.go:36
↓ 5 callersMethodForEachIdx
ForEachIdx is the same as ForEach except it also provides the index of the element to the callback.
iter/iter.go:59
↓ 5 callersMethodWait
Wait will block until all goroutines spawned with Go exit and will propagate any panics spawned in a child goroutine.
waitgroup.go:38
↓ 5 callersMethodWait
Wait signals to the stream that all tasks have been submitted. Wait will not return until all tasks and callbacks have been run.
stream/stream.go:91
↓ 4 callersFunctionForEachIdx
ForEachIdx is the same as ForEach except it also provides the index of the element to the callback.
iter/iter.go:55
↓ 4 callersMethodWaitAndRecover
WaitAndRecover will block until all goroutines spawned with Go exit and will return a *panics.Recovered if one of the child goroutines panics.
waitgroup.go:47
↓ 4 callersMethodWithFirstError
WithFirstError configures the pool to only return the first error returned by a task. By default, Wait() will return a combined error.
pool/error_pool.go:57
↓ 4 callersMethodWithMaxGoroutines
(n int)
stream/stream.go:105
↓ 4 callersMethodpanicIfInitialized
()
pool/result_context_pool.go:73
↓ 4 callersMethodpanicIfInitialized
panicIfInitialized will trigger a panic if a configuration method is called after the pool has started any goroutines for the first time. In the case
pool/pool.go:109
↓ 4 callersMethodpanicIfInitialized
()
pool/result_error_pool.go:78
↓ 3 callersMethodForEach
ForEach executes f in parallel over each element in input, using up to the Iterator's configured maximum number of goroutines. It is safe to mutate t
iter/iter.go:47
↓ 3 callersMethodadd
(res T)
pool/result_pool.go:89
↓ 3 callersMethodpanicIfInitialized
()
pool/result_pool.go:78
↓ 3 callersMethodpanicIfInitialized
()
pool/context_pool.go:92
↓ 3 callersMethodpanicIfInitialized
()
pool/error_pool.go:81
↓ 2 callersMethodMap
Map applies f to each element of input, returning the mapped result. Map uses up to the configured Mapper's maximum number of goroutines.
iter/map.go:27
↓ 2 callersMethodMaxGoroutines
MaxGoroutines returns the maximum size of the pool.
pool/pool.go:83
↓ 2 callersMethodRepanic
Repanic panics if any calls to Try caught a panic. It will panic with the value of the first panic caught, wrapped in a panics.Recovered with caller i
panics/panics.go:36
↓ 2 callersFunctionTry
Try executes f, catching and returning any panic it might spawn. The recovered panic can be propagated with panic(), or handled as a normal error wit
panics/try.go:7
↓ 2 callersMethodUnwrap
()
panics/panics.go:97
↓ 2 callersMethodWithCollectErrored
WithCollectErrored configures the pool to still collect the result of a task even if the task returned an error. By default, the result of tasks that
pool/result_error_pool.go:45
↓ 2 callersMethodaddErr
(err error)
pool/error_pool.go:85
↓ 2 callersFunctiondefaultMaxGoroutines
defaultMaxGoroutines returns the default maximum number of goroutines to use within this package.
iter/iter.go:12
↓ 2 callersMethodderef
deref is a helper that creates a shallow copy of the pool with the same settings. We don't want to just dereference the pointer because that makes the
pool/pool.go:127
↓ 2 callersMethodinit
init ensures that the pool is initialized before use. This makes the zero value of the pool usable.
pool/pool.go:100
↓ 2 callersMethodinit
()
stream/stream.go:110
↓ 1 callersMethodMapErr
MapErr applies f to each element of the input, returning the mapped result and a combined error of all returned errors. Map uses up to the configured
iter/map.go:48
↓ 1 callersFunctionNewRecovered
NewRecovered creates a panics.Recovered from a panic value and a collected stacktrace. The skip parameter allows the caller to skip stack frames when
panics/panics.go:52
↓ 1 callersFunctionNewWaitGroup
NewWaitGroup creates a new WaitGroup.
waitgroup.go:10
↓ 1 callersMethodderef
deref is a helper that creates a shallow copy of the pool with the same settings. We don't want to just dereference the pointer because that makes the
pool/error_pool.go:74
↓ 1 callersFunctiongetCh
()
stream/stream.go:146
↓ 1 callersMethodlimit
()
pool/pool.go:160
↓ 1 callersFunctionputCh
(ch callbackCh)
stream/stream.go:150
↓ 1 callersMethodrelease
()
pool/pool.go:164
↓ 1 callersMethodtryRecover
()
panics/panics.go:26
FunctionBenchmarkForEach
(b *testing.B)
iter/iter_test.go:169
FunctionBenchmarkPool
(b *testing.B)
pool/pool_test.go:127
FunctionBenchmarkStream
(b *testing.B)
stream/stream_test.go:122
MethodError
()
panics/panics.go:95
FunctionExampleCatcher
()
panics/panics_test.go:14
FunctionExampleCatcher_callers
()
panics/panics_test.go:30
FunctionExampleCatcher_error
()
panics/panics_test.go:64
FunctionExampleContextPool_WithCancelOnError
()
pool/context_pool_test.go:16
FunctionExampleErrorPool
()
pool/error_pool_test.go:14
FunctionExampleIterator
()
iter/iter_test.go:12
FunctionExampleMapper
()
iter/map_test.go:11
FunctionExamplePool
()
pool/pool_test.go:13
FunctionExampleResultPool
()
pool/result_pool_test.go:14
FunctionExampleStream
()
stream/stream_test.go:12
FunctionExampleWaitGroup
()
waitgroup_test.go:11
FunctionExampleWaitGroup_WaitAndRecover
()
waitgroup_test.go:27
MethodGo
Go submits a task to the pool. If all goroutines in the pool are busy, a call to Go() will block until the task can be started.
pool/result_context_pool.go:22
MethodGo
Go submits a task to the pool. If all goroutines in the pool are busy, a call to Go() will block until the task can be started.
pool/result_pool.go:32
MethodGo
Go submits a task. If it returns an error, the error will be collected and returned by Wait(). If all goroutines in the pool are busy, a call to Go()
pool/context_pool.go:24
MethodGo
Go submits a task to the pool. If all goroutines in the pool are busy, a call to Go() will block until the task can be started.
pool/error_pool.go:28
MethodGo
Go submits a task to the pool. If all goroutines in the pool are busy, a call to Go() will block until the task can be started.
pool/result_error_pool.go:25
MethodMaxGoroutines
MaxGoroutines returns the maximum size of the pool.
pool/result_pool.go:46
FunctionNewWithResults
NewWithResults creates a new ResultPool for tasks with a result of type T. The configuration methods (With*) will panic if they are used after callin
pool/result_pool.go:12
FunctionTestCatcher
(t *testing.T)
panics/panics_test.go:84
FunctionTestContextPool
(t *testing.T)
pool/context_pool_test.go:37
FunctionTestErrorPool
(t *testing.T)
pool/error_pool_test.go:31
FunctionTestForEach
(t *testing.T)
iter/iter_test.go:121
FunctionTestForEachIdx
(t *testing.T)
iter/iter_test.go:73
FunctionTestIterator
(t *testing.T)
iter/iter_test.go:29
FunctionTestMap
(t *testing.T)
iter/map_test.go:23
FunctionTestMapErr
(t *testing.T)
iter/map_test.go:82
FunctionTestPool
(t *testing.T)
pool/pool_test.go:29
FunctionTestRecoveredAsError
(t *testing.T)
panics/panics_test.go:146
FunctionTestResultContextPool
(t *testing.T)
pool/result_context_pool_test.go:17
FunctionTestResultErrorGroup
(t *testing.T)
pool/result_error_pool_test.go:14
FunctionTestResultGroup
(t *testing.T)
pool/result_pool_test.go:31
FunctionTestStream
(t *testing.T)
stream/stream_test.go:35
FunctionTestTry
(t *testing.T)
panics/try_test.go:10
FunctionTestWaitGroup
(t *testing.T)
waitgroup_test.go:40
MethodWait
Wait cleans up all spawned goroutines, propagates any panics, and returns an error if any of the tasks errored.
pool/result_context_pool.go:34
MethodWait
Wait cleans up all spawned goroutines, propagating any panics, and returning a slice of results from tasks that did not panic.
pool/result_pool.go:40
MethodWait
Wait cleans up all spawned goroutines, propagates any panics, and returns an error if any of the tasks errored.
pool/context_pool.go:54
MethodWait
Wait cleans up any spawned goroutines, propagating any panics and returning any errors from tasks.
pool/error_pool.go:36
MethodWait
Wait cleans up any spawned goroutines, propagating any panics and returning the results and any errors from tasks.
pool/result_error_pool.go:37
MethodWithCancelOnError
WithCancelOnError configures the pool to cancel its context as soon as any task returns an error. By default, the pool's context is not canceled until
pool/result_context_pool.go:59
MethodWithCollectErrored
WithCollectErrored configures the pool to still collect the result of a task even if the task returned an error. By default, the result of tasks that
pool/result_context_pool.go:42
MethodWithContext
WithContext converts the pool to a ResultContextPool for tasks that should run under the same context, such that they each respect shared cancellation
pool/result_pool.go:63
MethodWithContext
WithContext converts the pool to a ContextPool for tasks that should run under the same context, such that they each respect shared cancellation. For
pool/error_pool.go:45
next →1–100 of 112, ranked by callers