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

Method Wait

node/node.go:448–458  ·  view source on GitHub ↗

Wait blocks the thread until the node is stopped. If the node is not running at the time of invocation, the method immediately returns.

()

Source from the content-addressed store, hash-verified

446// Wait blocks the thread until the node is stopped. If the node is not running
447// at the time of invocation, the method immediately returns.
448func (n *Node) Wait() {
449 n.lock.RLock()
450 if n.server == nil {
451 n.lock.RUnlock()
452 return
453 }
454 stop := n.quitCh
455 n.lock.RUnlock()
456
457 <-stop
458}
459
460// Restart terminates a running node and boots up a new one in its place. If the
461// node isn't running, an error is returned.

Callers 15

mainFunction · 0.80
testParallelDBFuncsFunction · 0.80
StopMethod · 0.80
StopMethod · 0.80
CloseMethod · 0.80
testSchedulerFunction · 0.80
mainFunction · 0.80
doLinesFunction · 0.80
TestTokenBucketFunction · 0.80
runFunction · 0.80

Calls

no outgoing calls

Tested by 7

testParallelDBFuncsFunction · 0.64
testSchedulerFunction · 0.64
TestTokenBucketFunction · 0.64
testClientCancelFunction · 0.64
testSendTransactionsFunction · 0.64
TestQueuePutAndGetFunction · 0.64