mirror of
https://github.com/lkmio/lkm.git
synced 2025-10-05 15:16:49 +08:00
修复rtmp内存池缓存失败问题
This commit is contained in:
19
stream/queue_test.go
Normal file
19
stream/queue_test.go
Normal 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)))
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user