bug fix:并发读写map问题;add:新增Stop()函数

This commit is contained in:
2024-11-28 18:36:19 +08:00
parent 5cb3c6d651
commit d58df54cd6
3 changed files with 28 additions and 4 deletions
+6
View File
@@ -38,6 +38,12 @@ func (n *NfQueue) SetRecall(fn func(id uint32, q *nfqueue.Nfqueue, p Packet)) {
n.recallFn = fn
}
func (n *NfQueue) Stop() {
if n.stopFn != nil {
n.stopFn()
}
}
func (n *NfQueue) Run() error {
cfg := nfqueue.Config{
NfQueue: n.queid,