voice.go: remove runtime.LockOSThread call from opusSender (#404)

runtime.LockOSThread does not do anything for performance and is instead
intended for interfacing with libraries that use thread local data structures.

Closes #402
This commit is contained in:
Anmol Sethi 2017-07-08 11:09:04 -04:00 committed by Chris Rhodes
parent 0993a94b4e
commit d420e28024

View file

@ -15,7 +15,6 @@ import (
"fmt"
"log"
"net"
"runtime"
"strings"
"sync"
"time"
@ -659,8 +658,6 @@ func (v *VoiceConnection) opusSender(udpConn *net.UDPConn, close <-chan struct{}
return
}
runtime.LockOSThread()
// VoiceConnection is now ready to receive audio packets
// TODO: this needs reviewed as I think there must be a better way.
v.Lock()