Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/chebyrash/promise
/ functions
Functions
31 in github.com/chebyrash/promise
⨍
Functions
31
◇
Types & classes
4
↓ 20 callers
Function
New
( executor func(resolve func(T), reject func(error)), )
promise.go:17
↓ 15 callers
Method
Await
(ctx context.Context)
promise.go:104
↓ 6 callers
Function
NewWithPool
( executor func(resolve func(T), reject func(error)), pool Pool, )
promise.go:23
↓ 3 callers
Function
All
All resolves when all promises have resolved, or rejects immediately upon any of the promises rejecting
promise.go:142
↓ 3 callers
Function
CatchWithPool
( p *Promise[T], ctx context.Context, reject func(err error) error, pool Pool, )
promise.go:88
↓ 3 callers
Function
Race
Race resolves or rejects as soon as any one of the promises resolves or rejects
promise.go:189
↓ 3 callers
Function
ThenWithPool
( p *Promise[A], ctx context.Context, resolve func(A) (B, error), pool Pool, )
promise.go:57
↓ 2 callers
Function
Then
( p *Promise[A], ctx context.Context, resolve func(A) (B, error), )
promise.go:49
↓ 2 callers
Function
newDefaultPool
()
pool.go:26
↓ 2 callers
Method
reject
(err error)
promise.go:120
↓ 1 callers
Function
AllWithPool
( ctx context.Context, pool Pool, promises ...*Promise[T], )
promise.go:149
↓ 1 callers
Function
FromAntsPool
(p *ants.Pool)
pool.go:36
↓ 1 callers
Function
FromConcPool
(p *conc.Pool)
pool.go:32
↓ 1 callers
Method
Go
(f func())
pool.go:13
↓ 1 callers
Function
RaceWithPool
( ctx context.Context, pool Pool, promises ...*Promise[T], )
promise.go:196
↓ 1 callers
Method
handlePanic
()
promise.go:127
Function
Catch
( p *Promise[T], ctx context.Context, reject func(err error) error, )
promise.go:80
Method
Go
(f func())
pool.go:22
Function
SetDefaultPool
(p Pool)
pool.go:16
Function
TestAll_ContainsRejected
(t *testing.T)
promise_test.go:139
Function
TestAll_Happy
(t *testing.T)
promise_test.go:120
Function
TestAll_OnlyRejected
(t *testing.T)
promise_test.go:158
Function
TestNew
(t *testing.T)
promise_test.go:19
Function
TestNewWithPool
(t *testing.T)
promise_test.go:26
Function
TestPromise_Catch
(t *testing.T)
promise_test.go:90
Function
TestPromise_Panic
(t *testing.T)
promise_test.go:101
Function
TestPromise_Then
(t *testing.T)
promise_test.go:65
Function
TestRace_ContainsRejected
(t *testing.T)
promise_test.go:195
Function
TestRace_Happy
(t *testing.T)
promise_test.go:177
Function
TestRace_OnlyRejected
(t *testing.T)
promise_test.go:212
Method
resolve
(value T)
promise.go:113