mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-16 19:33:09 -06:00
Add comments
This commit is contained in:
parent
b91ac954e4
commit
54f168a99c
|
|
@ -101,8 +101,8 @@ func (oq *destinationQueue) backgroundSend() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// nextTransaction creates a new transaction from the pending event
|
// nextTransaction creates a new transaction from the pending event
|
||||||
// queue and sends it.
|
// queue and sends it. Returns true if a transaction was sent or
|
||||||
// Returns nil if the queue was empty.
|
// false otherwise.
|
||||||
func (oq *destinationQueue) nextTransaction() bool {
|
func (oq *destinationQueue) nextTransaction() bool {
|
||||||
oq.runningMutex.Lock()
|
oq.runningMutex.Lock()
|
||||||
defer oq.runningMutex.Unlock()
|
defer oq.runningMutex.Unlock()
|
||||||
|
|
@ -154,6 +154,8 @@ func (oq *destinationQueue) nextTransaction() bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// nextInvite takes pending invite events from the queue and sends
|
||||||
|
// them. Returns true if a transaction was sent or false otherwise.
|
||||||
func (oq *destinationQueue) nextInvites() bool {
|
func (oq *destinationQueue) nextInvites() bool {
|
||||||
oq.runningMutex.Lock()
|
oq.runningMutex.Lock()
|
||||||
defer oq.runningMutex.Unlock()
|
defer oq.runningMutex.Unlock()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue