MCPcopy Create free account
hub / github.com/33cn/chain33 / Start

Method Start

queue/queue.go:134–152  ·  view source on GitHub ↗

Start 开始运行消息队列

()

Source from the content-addressed store, hash-verified

132
133// Start 开始运行消息队列
134func (q *queue) Start() {
135 c := make(chan os.Signal, 1)
136 signal.Notify(c, os.Interrupt, syscall.SIGTERM)
137 // Block until a signal is received.
138 select {
139 case <-q.done:
140 qlog.Info("closing chain33 done")
141 //atomic.StoreInt32(&q.isClose, 1)
142 break
143 case <-q.interrupt:
144 qlog.Info("closing chain33")
145 //atomic.StoreInt32(&q.isClose, 1)
146 break
147 case s := <-c:
148 qlog.Info("Got signal:", "s", s)
149 //atomic.StoreInt32(&q.isClose, 1)
150 break
151 }
152}
153
154func (q *queue) isClosed() bool {
155 return atomic.LoadInt32(&q.isClose) == 1

Callers

nothing calls this directly

Calls 2

NotifyMethod · 0.65
InfoMethod · 0.65

Tested by

no test coverage detected