You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are certain cases where the host/guest implementation needs to pass an asynchronous function. Can this be supported in the JavaScript codegen even when the WIT definition has its signature as synchronous?
The text was updated successfully, but these errors were encountered:
It is up to the implementation to ensure it provides a sync API. In Node.js it is always possible to syncify any call though on the implementaiton side by creating a worker thread and using atomics to synchronously wait on a shared lock in the worker that is performing asynchronous work. Usually it's best to just have a fully sync implementation though.
Yes, we will follow in this path in the Jco project, where functions may support both sync and async variants depending on the canon ABI option passed. Preview 3 support is a little way off though still.
If anyone is interested in prototyping in the mean time along a similar lines, work here would be welcome.
There are certain cases where the host/guest implementation needs to pass an asynchronous function. Can this be supported in the JavaScript codegen even when the WIT definition has its signature as synchronous?
The text was updated successfully, but these errors were encountered: