1
0
Fork 0
forked from External/ergo

extract Semaphore to utils package

This commit is contained in:
Shivaram Lingamneni 2019-04-15 11:13:13 -04:00
parent a8f04ecc4d
commit 97e71dfef7
4 changed files with 59 additions and 48 deletions

View file

@ -15,6 +15,8 @@ import (
"strings"
"sync"
"time"
"github.com/oragono/oragono/irc/utils"
)
var (
@ -34,7 +36,7 @@ type Socket struct {
maxSendQBytes int
// this is a trylock enforcing that only one goroutine can write to `conn` at a time
writerSemaphore Semaphore
writerSemaphore utils.Semaphore
buffers [][]byte
totalLength int