mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 13:46:13 +00:00
document IPC broadcast
This commit is contained in:
parent
b4663d82e9
commit
929d775aad
|
@ -731,10 +731,17 @@ export class IPCServer<TContext = string> implements IChannelServer<TContext>, I
|
|||
listen(eventName: string, arg: any): Event<T> {
|
||||
let disposables = new DisposableStore();
|
||||
|
||||
// Create an emitter which hooks up to all clients
|
||||
// as soon as first listener is added. It also
|
||||
// disconnects from all clients as soon as the last listener
|
||||
// is removed.
|
||||
const emitter = new Emitter<T>({
|
||||
onFirstListenerAdd: () => {
|
||||
disposables = new DisposableStore();
|
||||
|
||||
// The event multiplexer is useful since the active
|
||||
// client list is dynamic. We need to hook up and disconnection
|
||||
// to/from clients as they come and go.
|
||||
const eventMultiplexer = new EventMultiplexer<T>();
|
||||
const map = new Map<Connection<TContext>, IDisposable>();
|
||||
|
||||
|
|
Loading…
Reference in a new issue