File tree 3 files changed +28
-31
lines changed
3 files changed +28
-31
lines changed Original file line number Diff line number Diff line change @@ -248,7 +248,34 @@ resource availability as possible.
248
248
249
249
### PTY communication overview (Renderer Process <=> Shared Process)
250
250
251
- ![ PTY communication] ( docs/ptyCommunication.png )
251
+ ``` mermaid
252
+ sequenceDiagram
253
+ autonumber
254
+ participant DT as Document Terminal
255
+ participant PS as PTY Service
256
+ participant PHS as PTY Host Service
257
+ participant PP as PTY Process
258
+
259
+ DT->>PS: wants new PTY
260
+ Note over PS,PHS: gRPC communication
261
+ PS->>PHS: createPtyProcess(options)
262
+ PHS->>PP: new PtyProcess()
263
+ PHS-->>PS: ptyId of the process is returned
264
+ PS->>PHS: establishExchangeEvents(ptyId) channel
265
+ Note right of DT: client has been created,<br/> so PTY Service can attach <br/> event handlers to the channel <br/>(onData/onOpen/onExit)
266
+ PS-->>DT: pty process object
267
+ DT->>PS: start()
268
+ PS->>PHS: exchangeEvents.start()
269
+ Note left of PP: exchangeEvents attaches event handlers<br/>to the PTY Process (onData/onOpen/onExit)
270
+ PHS->>PP: start()
271
+ PP-->>PHS: onOpen()
272
+ PHS-->>PS: exchangeEvents.onOpen()
273
+ PS-->>DT: onOpen()
274
+ DT->>PS: dispose()
275
+ PS->>PHS: end exchangeEvents channel
276
+ PHS->>PP: dispose process and remove it
277
+
278
+ ```
252
279
253
280
### Overview of a deep link launch process
254
281
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments