MCPcopy Create free account
hub / github.com/CPChain/chain / newQueue

Function newQueue

protocols/cpc/syncer/queue.go:31–37  ·  view source on GitHub ↗
(size int)

Source from the content-addressed store, hash-verified

29}
30
31func newQueue(size int) *queue {
32 return &queue{
33 queue: make(chan resultTask, size),
34 size: 0,
35 limit: int32(size),
36 }
37}
38
39func (q *queue) get() (resultTask, error) {
40 timer := time.NewTimer(1 * time.Second)

Callers 4

TestQueuePutAndGetFunction · 0.85
TestClearQueueFunction · 0.85
TestQueueGetTimeoutFunction · 0.85
NewFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestQueuePutAndGetFunction · 0.68
TestClearQueueFunction · 0.68
TestQueueGetTimeoutFunction · 0.68