mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-14 10:23:46 -06:00
Comments
This commit is contained in:
parent
97eadc91f6
commit
ef245c3549
|
|
@ -28,11 +28,15 @@ import (
|
||||||
type UserStream struct {
|
type UserStream struct {
|
||||||
UserID string
|
UserID string
|
||||||
// The lock that protects changes to this struct
|
// The lock that protects changes to this struct
|
||||||
lock sync.Mutex
|
lock sync.Mutex
|
||||||
signalChannel chan struct{}
|
// Closed when there is an update.
|
||||||
pos types.StreamPosition
|
signalChannel chan struct{}
|
||||||
|
// The last stream position that there may have been an update for the suser
|
||||||
|
pos types.StreamPosition
|
||||||
|
// The last time when we had some listeners waiting
|
||||||
timeOfLastChannel time.Time
|
timeOfLastChannel time.Time
|
||||||
numWaiting uint
|
// The number of listeners waiting
|
||||||
|
numWaiting uint
|
||||||
}
|
}
|
||||||
|
|
||||||
// UserStreamListener allows a sync request to wait for updates for a user.
|
// UserStreamListener allows a sync request to wait for updates for a user.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue