Hi, first of all thank you for all the hard work you put into this library!
I am using quickjs-emscripten for my own internal project and have run into an issue while using newAsyncifiedFunction in combination with QuickJS async runtime/context executePendingJob.
Firstly, after checking the FFI, the executePendingJob function has a corresponding _MaybeAsync version which is not exposed but necessary to resolve the issue.
However, in the @jitl/quickjs-wasmfile-release-asyncify, in the following file, the {async: true} option is missing (which is present in the @jitl/quickjs-wasmfile-debug-asyncify)
|
QTS_ExecutePendingJob_MaybeAsync: ( |
|
rt: JSRuntimePointer, |
|
maxJobsToExecute: number, |
|
lastJobContext: JSContextPointerPointer, |
|
) => JSValuePointer | Promise<JSValuePointer> = this.module.cwrap( |
|
"QTS_ExecutePendingJob", |
|
"number", |
|
["number", "number", "number"], |
|
) |
|
QTS_ExecutePendingJob_MaybeAsync: ( |
|
rt: JSRuntimePointer, |
|
maxJobsToExecute: number, |
|
lastJobContext: JSContextPointerPointer, |
|
) => JSValuePointer | Promise<JSValuePointer> = this.module.cwrap( |
|
"QTS_ExecutePendingJob", |
|
"number", |
|
["number", "number", "number"], |
|
{ async: true }, |
|
) |
Is this intended? This results in a different behaviour between those builds. Additionally, is there a reason for the async version of executePendingJob not being available on the runtime?
Version number of all libraries involved is 0.31.0
Hi, first of all thank you for all the hard work you put into this library!
I am using
quickjs-emscriptenfor my own internal project and have run into an issue while usingnewAsyncifiedFunctionin combination with QuickJS async runtime/contextexecutePendingJob.Firstly, after checking the FFI, the
executePendingJobfunction has a corresponding_MaybeAsyncversion which is not exposed but necessary to resolve the issue.However, in the
@jitl/quickjs-wasmfile-release-asyncify, in the following file, the{async: true}option is missing (which is present in the@jitl/quickjs-wasmfile-debug-asyncify)quickjs-emscripten/packages/variant-quickjs-wasmfile-release-asyncify/src/ffi.ts
Lines 221 to 229 in aa48b61
quickjs-emscripten/packages/variant-quickjs-wasmfile-debug-asyncify/src/ffi.ts
Lines 222 to 231 in aa48b61
Is this intended? This results in a different behaviour between those builds. Additionally, is there a reason for the async version of
executePendingJobnot being available on the runtime?Version number of all libraries involved is
0.31.0