From 7858ad214af2b27e165653ca5b9bd964b487d20d Mon Sep 17 00:00:00 2001
From: zhangmeng <775834166@qq.com>
Date: 星期二, 17 十二月 2019 10:44:16 +0800
Subject: [PATCH] udpate

---
 work/sdk/ydetect.go |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/work/sdk/ydetect.go b/work/sdk/ydetect.go
index 9b641c9..3a95a02 100644
--- a/work/sdk/ydetect.go
+++ b/work/sdk/ydetect.go
@@ -3,9 +3,7 @@
 import (
 	"analysis/logo"
 	"analysis/work"
-	"container/list"
 	"context"
-	"sync"
 
 	"basic.com/valib/gogpu.git"
 
@@ -27,9 +25,7 @@
 
 	tracker map[string]*trackInfo
 
-	cache *list.List
-	cv    *sync.Cond
-	cond  bool
+	list *LockList
 }
 
 // NewYDetectWithTrack with track
@@ -39,9 +35,7 @@
 		cfg:     cfg,
 		weights: weights,
 		name:    name,
-		cache:   list.New(),
-		cv:      sync.NewCond(&sync.Mutex{}),
-		cond:    false,
+		list:    NewLockList(6),
 	}
 }
 
@@ -67,5 +61,4 @@
 // Run impl interface
 func (y *YoloDetect) Run(ctx context.Context, in <-chan work.MsgRS, out chan<- work.MsgRS, typ string) {
 	y.detectTrack(ctx, in, out, typ)
-
 }

--
Gitblit v1.8.0