Skip to content

Commit

Permalink
Use queue.Queue instead of mlink.Queue.
Browse files Browse the repository at this point in the history
The benchmarks show this uses slightly less memory, and in some cases runs a
little bit faster. It's not really a huge improvement, but no harm.
  • Loading branch information
creachadair committed Mar 18, 2024
1 parent b524fa0 commit aa2d9ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"time"

"github.com/creachadair/jrpc2/channel"
"github.com/creachadair/mds/mlink"
"github.com/creachadair/mds/queue"
"golang.org/x/sync/semaphore"
)

Expand Down Expand Up @@ -74,7 +74,7 @@ type Server struct {
nbar sync.WaitGroup // notification barrier (see the dispatch method)
err error // error from a previous operation
work chan struct{} // for signaling message availability
inq mlink.Queue[jmessages] // inbound requests awaiting processing
inq queue.Queue[jmessages] // inbound requests awaiting processing
ch channel.Channel // the channel to the client

// For each request ID currently in-flight, this map carries a cancel
Expand Down

0 comments on commit aa2d9ef

Please sign in to comment.