87
88
private _notifyChanged(): void {
90
>
// is being notified.
91
>
for (const listener of [...this._changeListeners]) {
92
listener();
93
}
95
96
register(clientId: string, connection: IByokLmBridgeConnection): IDisposable {
98
>
this._entries.get(clientId)?.store.dispose();
99
>
100
>
const store = new DisposableStore();
101
>
const entry: IConnectionEntry = { connection, models: undefined, store };
102
>
this._entries.set(clientId, entry);
103
>
104
>
// Cache each pushed snapshot; notify only when the serving set changes.
105
>
store.add(connection.onDidChangeModels(models => {
106
// Drop the push if the entry was removed/replaced meanwhile.
107
if (this._entries.get(clientId) !== entry) {