Skip to content

Commit

Permalink
voice.go: remove runtime.LockOSThread call from opusSender (#404)
Browse files Browse the repository at this point in the history
runtime.LockOSThread does not do anything for performance and is instead
intended for interfacing with libraries that use thread local data structures.

Closes #402
  • Loading branch information
nhooyr authored and iopred committed Jul 8, 2017
1 parent 0993a94 commit d420e28
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions voice.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
"fmt"
"log"
"net"
"runtime"
"strings"
"sync"
"time"
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit d420e28

Please sign in to comment.