MCPcopy Create free account
hub / github.com/pion/ice / New

Function New

internal/taskloop/taskloop.go:35–45  ·  view source on GitHub ↗

New creates and starts a new task loop.

(onClose func())

Source from the content-addressed store, hash-verified

33
34// New creates and starts a new task loop.
35func New(onClose func()) *Loop {
36 l := &Loop{
37 tasks: make(chan task),
38 done: make(chan struct{}),
39 taskLoopDone: make(chan struct{}),
40 }
41
42 go l.runLoop(onClose)
43
44 return l
45}
46
47// runLoop handles registered tasks and agent close.
48func (l *Loop) runLoop(onClose func()) {

Calls 1

runLoopMethod · 0.95