Skip to content

Commit

Permalink
Back to a working coincident setup
Browse files Browse the repository at this point in the history
  • Loading branch information
martinRenou committed Sep 9, 2024
1 parent 8143149 commit b38ba60
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/coincident.worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ export class XeusCoincidentKernel extends XeusRemoteKernel {

const worker = new XeusCoincidentKernel();

const sendWorkerMessage = workerAPI.processWorkerMessage.bind(workerAPI);
worker.registerCallback(sendWorkerMessage);

workerAPI.initialize = worker.initialize.bind(worker);
workerAPI.mount = worker.mount.bind(worker);
workerAPI.ready = worker.ready.bind(worker);
workerAPI.cd = worker.cd.bind(worker);
workerAPI.isDir = worker.isDir.bind(worker);
workerAPI.processMessage = worker.processMessage.bind(worker);
4 changes: 2 additions & 2 deletions src/web_worker_kernel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ export class WebWorkerKernel implements IKernel {
): IXeusWorkerKernel | Remote<IXeusWorkerKernel> {
let remote: IXeusWorkerKernel | Remote<IXeusWorkerKernel>;
if (crossOriginIsolated) {
this._worker.onmessage = this._processCoincidentWorkerMessage.bind(this);

remote = coincident(this._worker) as IXeusWorkerKernel;
remote.processWorkerMessage =
this._processCoincidentWorkerMessage.bind(this);
// The coincident worker uses its own filesystem API:
(remote.processDriveRequest as any) = async <T extends TDriveMethod>(
data: TDriveRequest<T>
Expand Down

0 comments on commit b38ba60

Please sign in to comment.