From d420e28024ad527390b43aa7f64e029083e11989 Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Sat, 8 Jul 2017 11:09:04 -0400 Subject: [PATCH] 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 --- voice.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/voice.go b/voice.go index 8b566f4..da7b8c9 100644 --- a/voice.go +++ b/voice.go @@ -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()