diff options
| author | bob <bcz@cs.brown.edu> | 2020-01-10 16:05:02 -0500 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2020-01-10 16:05:02 -0500 |
| commit | 12a54031b6b22b02c5fc08f80b3079d84785e457 (patch) | |
| tree | bf277107837a4079981ba3e5a3e3910c2c892a87 /src/server/session/agents/applied_session_agent.ts | |
| parent | 596d30bc3f755eaafd413ced7613ace6735458fa (diff) | |
| parent | ee10e28ba3f7c97b0947e2065d04562e33ed3498 (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/server/session/agents/applied_session_agent.ts')
| -rw-r--r-- | src/server/session/agents/applied_session_agent.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/server/session/agents/applied_session_agent.ts b/src/server/session/agents/applied_session_agent.ts index cb7f63c34..53293d3bf 100644 --- a/src/server/session/agents/applied_session_agent.ts +++ b/src/server/session/agents/applied_session_agent.ts @@ -8,8 +8,8 @@ export abstract class AppliedSessionAgent { // the following two methods allow the developer to create a custom // session and use the built in customization options for each thread - protected abstract async launchMonitor(): Promise<Monitor>; - protected abstract async launchServerWorker(): Promise<ServerWorker>; + protected abstract async initializeMonitor(monitor: Monitor): Promise<void>; + protected abstract async initializeServerWorker(): Promise<ServerWorker>; private launched = false; @@ -43,9 +43,10 @@ export abstract class AppliedSessionAgent { if (!this.launched) { this.launched = true; if (isMaster) { - this.sessionMonitorRef = await this.launchMonitor(); + await this.initializeMonitor(this.sessionMonitorRef = Monitor.Create()); + this.sessionMonitorRef.finalize(); } else { - this.serverWorkerRef = await this.launchServerWorker(); + this.serverWorkerRef = await this.initializeServerWorker(); } } else { throw new Error("Cannot launch a session thread more than once per process."); |
