func (o *baseOp) Active() bool {
	o.m.Lock()
	defer o.m.Unlock()
	return o.started
}
Active indicates whether an operation is active
package dnssd
import (
	"sync"
	"unsafe"
)
const InterfaceIndexAny = 0
const InterfaceIndexLocalOnly = int(^uint(0) >> 1)
const (
	_FlagsAdd             uint32 = 0x2
	_FlagsNoAutoRename           = 0x8
	_FlagsShareConnection        = 0x4000
)
type baseOp struct {
	m              sync.Mutex
	shared         bool
	started        bool
	interfaceIndex int
	flags          uint32
}
var callbackQueueState struct {
	sync.Mutex
	c chan bool
	f []func()
}
func queueCallback(f func()) {
	callbackQueueState.Lock()
	defer callbackQueueState.Unlock()
	if callbackQueueState.c == nil {
		callbackQueueState.c = make(chan bool, 1)
		go callbackQueueLoop()
	}
	callbackQueueState.f = append(callbackQueueState.f, f)
	select {
	case callbackQueueState.c <- true:
	default:
	}
}
func callbackQueueLoop() {
	for {
		_ = <-callbackQueueState.c
		callbackQueueState.Lock()
		f := callbackQueueState.f
		callbackQueueState.f = nil
		callbackQueueState.Unlock()
		for i := range f {
			f[i]()
		}
	}
}
func (o *baseOp) setFlag(flag uint32, enabled bool) {
	set := o.flags&flag != 0
	if set != enabled {
		o.flags ^= flag
	}
}