From aa2d9ef37124917d66c631116239ae7127924edf Mon Sep 17 00:00:00 2001 From: "M. J. Fromberger" Date: Sun, 17 Mar 2024 17:36:46 -0700 Subject: [PATCH] Use queue.Queue instead of mlink.Queue. 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. --- server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.go b/server.go index fc5b887..8f81bc4 100644 --- a/server.go +++ b/server.go @@ -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" ) @@ -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