mirror of
https://github.com/jeremyd/ergo.git
synced 2026-07-03 23:33:36 -07:00
extract Semaphore to utils package
This commit is contained in:
+3
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user