-
Notifications
You must be signed in to change notification settings - Fork 6
Update offscreen.ts #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update offscreen.ts #144
Conversation
11d04ae to
0f867c0
Compare
| } | ||
| })(), | ||
| kernelWorker.receiveMessages(), | ||
| return undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We trigger an ESLint rule without this.
| await Promise.all([ | ||
| (async () => { | ||
| kernelWorker.receiveMessages(), | ||
| kernelInitKit.promise.then(async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now we only await the init promise once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice.
| logger.error('Received unexpected reply', message); | ||
| continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this downgrade in preparation for some future change? We never seem to hit this condition on your branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's an artifact of a hypothetical era. Since the worker stream is typed and guarded we could just remove this check altogether.
| { method: typeof KernelCommandMethod.InitKernel } | ||
| >['params'] | ||
| >(); | ||
| const kernelInitKit = makePromiseKit<void>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing actually used the resolved value of this promise anyway.
4113bec
into
grypez/move-kernel-to-dedicated-worker-with-message-channel
No description provided.