修复rtmp内存池缓存失败问题

This commit is contained in:
yangjie
2023-11-26 20:28:14 +08:00
parent f932284313
commit e84df324bf
7 changed files with 139 additions and 43 deletions

19
stream/queue_test.go Normal file
View File

@@ -0,0 +1,19 @@
package stream
import (
"fmt"
"testing"
)
func TestQueue(t *testing.T) {
queue := NewQueue(1)
for i := 0; i < 100; i++ {
queue.Push(i)
}
for i := 0; i < 100; i++ {
pop := queue.PopBack()
println(fmt.Sprintf("element:%d", pop.(int)))
}
}