MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / Wait

Method Wait

cmd/cql-proxy/task/task.go:123–141  ·  view source on GitHub ↗

Wait waits task for completion or wait timeout.

(ctx context.Context, id int64)

Source from the content-addressed store, hash-verified

121
122// Wait waits task for completion or wait timeout.
123func (m *Manager) Wait(ctx context.Context, id int64) (err error) {
124 i := &waitItem{
125 id: id,
126 ch: make(chan struct{}),
127 }
128
129 m.waitCh <- i
130
131 select {
132 case <-i.ch:
133 return
134 case <-ctx.Done():
135 err = ctx.Err()
136 return
137 case <-m.ctx.Done():
138 err = m.ctx.Err()
139 return
140 }
141}
142
143// New pushes new task to scheduling pool.
144func (m *Manager) New(tt model.TaskType, developer int64, account int64, args gin.H) (id int64, err error) {

Callers 15

stopMethod · 0.80
blockingFetchBlockMethod · 0.80
TestConnAndSeqAllocationFunction · 0.80
closeMethod · 0.80
runPeerListUpdaterFunction · 0.80
TestCryptoConn_RWFunction · 0.80
TestMultiChainFunction · 0.80
syncHeadMethod · 0.80
processBlocksMethod · 0.80
stopMethod · 0.80
stopMethod · 0.80

Calls

no outgoing calls

Tested by 15

TestConnAndSeqAllocationFunction · 0.64
TestCryptoConn_RWFunction · 0.64
TestMultiChainFunction · 0.64
stopNodesFunction · 0.64
TestFullProcessFunction · 0.64
stopNodesFunction · 0.64
TestFullProcessFunction · 0.64
TestConcurrentGetSetFunction · 0.64
TestMemWal_Write2Function · 0.64
createNodesWithPublicKeyFunction · 0.64
TestSerializableStateFunction · 0.64