Restructuring emscripten_dlopen_js
Solves #21440
emscripten_dlopen_js
Description:
Promise-Based Approach as the cannonical approach: Anchoring asynchronous operations within a Promise object, giving a method to manage asynchronous tasks
Callback Support: Maintains backward compatibility with callback functions (onsuccess, onerror)
ASYNCIFY Integration: Bridges synchronous C/C++ code with asynchronous JavaScript operations by compiling the WebAssembly module with ASYNCIFY enabled and specifying asynchronous functions like _emscripten_dlopen_js in ASYNCIFY_IMPORTS
@sbc100 @tlively I have made an initial api restructuring draft for emscripten_dlopen_js async function. Kindly provide feedback on this implementation
@tlively @sbc100 I have done the whole setup for test suite and pushed the code. But after running the test , it is getting stuck test/runner core0.test_pthread_dlopen_many Test suites: ['test_core'] Running test_core: (1 tests) (checking sanity from test runner) shared:INFO: (Emscripten: Running sanity checks) test_pthread_dlopen_many (test_core.core0.test_pthread_dlopen_many) ...
If you add --verbose to the runner command, it should print out the commands it's using to build and run the test case. You can then run those commands yourself to debug the code.
@tlively @sbc100 @kripken I have made a revision in dlopen api which inverts the callback functionality to use promises as the main form and implementating callbacks and asyncify around it. Can you provide me feedback on this so that I can take it ahead from here.