forked from External/ergo
extract Semaphore to utils package
This commit is contained in:
parent
a8f04ecc4d
commit
97e71dfef7
4 changed files with 59 additions and 48 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue