Sonic is a Go library for network and I/O programming that provides developers with a consistent asynchronous model, with a focus on achieving the lowest possible latency and jitter in Go.
We might have race conditions on p.pending which will cause problems when ioc.RunPending(). Either make that variable atomic or use the already existing lck to handle it.