Skip to content
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

rewrite dynamic-vat device to accomodate async import-bundle #1112

Closed
warner opened this issue May 14, 2020 · 1 comment
Closed

rewrite dynamic-vat device to accomodate async import-bundle #1112

warner opened this issue May 14, 2020 · 1 comment
Assignees
Labels
SwingSet package: SwingSet

Comments

@warner
Copy link
Member

warner commented May 14, 2020

The old @agoric/evaluate was synchronous, just like plain eval. This enabled the dynamic-vat creation device to allocate a vat-id, evaluate the new vat's source code, and return the vat-id to the caller, all in a single turn.

The new import-bundle function is async, to make room for more sophisticated module loading/importing mechanisms in the future.

The task is to rewrite the dynamic-vat creation code to accomodate this async function. The vat-id needs to be returned immediately, but we should allow the actual creation of the vat to happen later. We already send an async message back to the caller with a reference to the new vat's root object. The tricky bit is that the device doesn't get to participate in promises (vats do promises, but not devices), so hooking up the completion callback to a place that can do something useful with it will take a bit of work.

@warner warner added the SwingSet package: SwingSet label May 14, 2020
@warner warner self-assigned this May 14, 2020
warner added a commit that referenced this issue May 28, 2020
@warner
Copy link
Member Author

warner commented Jun 27, 2020

This landed as part of #1201

@warner warner closed this as completed Jun 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SwingSet package: SwingSet
Projects
None yet
Development

No branches or pull requests

1 participant