This commit is contained in:
Neil Alexander 2021-01-29 16:32:40 +00:00
parent 9961ff5f77
commit 69fece067a
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -11,9 +11,15 @@ import (
"go.uber.org/atomic"
)
const PDU_STREAM_QUEUESIZE = 2048
// The max number of per-room goroutines to have running.
// Too high and this will consume lots of CPU, too low and complete
// sync responses will take longer to process.
const PDU_STREAM_WORKERS = 256
// The maximum number of tasks that can be queued in total before
// backpressure will build up and the rests will start to block.
const PDU_STREAM_QUEUESIZE = PDU_STREAM_WORKERS * 8
type PDUStreamProvider struct {
StreamProvider