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
Will this extension support non-blocking operation and state serialization?
Additional details
It can in many cases be helpful to run code for a certain number of instructions, or milliseconds before execution is preemptively halted.
This can be useful for example in event loop environments such as swoole or ReactPHP.
To support this, it would be necessary that wasm methods could return a special "WasmHalted" object. This object could represent that execution was halted due to timeout, waiting for IO, or it could represent a request for opening a resource such as a file.
I would love if this object could be serialized and resumed. Sure, the serialized object can become quite large, if the wasm binary uses a lot of memory but that would be my problem.
The text was updated successfully, but these errors were encountered:
So far, the Wasmer runtime (the underlying WebAssembly runtime) supports gas metering, but I don't think it is what you want. I think a first step is wasmerio/wasmer#480. This is implemented, but not the C API doesn't handle it for the moment. We can work on it though.
Summary
Will this extension support non-blocking operation and state serialization?
Additional details
It can in many cases be helpful to run code for a certain number of instructions, or milliseconds before execution is preemptively halted.
This can be useful for example in event loop environments such as swoole or ReactPHP.
To support this, it would be necessary that wasm methods could return a special "WasmHalted" object. This object could represent that execution was halted due to timeout, waiting for IO, or it could represent a request for opening a resource such as a file.
I would love if this object could be serialized and resumed. Sure, the serialized object can become quite large, if the wasm binary uses a lot of memory but that would be my problem.
The text was updated successfully, but these errors were encountered: