mirror of
https://github.com/floci-io/floci.git
synced 2026-11-26 23:29:28 -05:00
GuardedMessageQueue copied the whole message list three times on every change and once more on every receive, so SendMessage and ReceiveMessage cost more the deeper the queue was. The queue now keeps its messages in MessageList, an immutable list whose appends share one array. A send or a receive copies nothing, and a removal copies the list once. The store still gets a list that never changes afterwards, and a failed save still leaves the queue as it was.