-
Notifications
You must be signed in to change notification settings - Fork 21
Web Worker / Node Typing & a few project tweaks #47
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: RaenonX <[email protected]>
Signed-off-by: RaenonX <[email protected]>
Signed-off-by: RaenonX <[email protected]>
This splits the import namespaces to ensure the typing is correct. `terminate()` is also added for GC. Without `terminate()`, WASM could easily get OOM since the webworker instance is not terminated. Signed-off-by: RaenonX <[email protected]>
Signed-off-by: RaenonX <[email protected]>
Signed-off-by: RaenonX <[email protected]>
Signed-off-by: RaenonX <[email protected]>
In v5.0.0, `import glpk from '@raenonx/glpk.js'` was not possible. It had to be either `@raenonx/glpk.js/web` or `@raenonx/glpk.js/node`. After this commit, `import glpk from '@raenonx/glpk.js'` is now possible (again) with the constructed instance always being async. Signed-off-by: RaenonX <[email protected]>
|
Salut @RaenonX, thank you for sharing. I am a bit less fast paced it seems ... good that you have solved your problem with your own package: Keep the PR open please I will need a bit of time to look into it and it is certainly a good idea to renovate the whole lib. |
No problem, I can keep the PR open! tbh I forgot the exact reason why I picked this package over other packages initially, but I didn't switch because I find it too much to switch given that I broke the implementation regarding GLPK in my code to many pieces. |
Thanks for the project!
This includes the following changes:
/distremoval,Makefileargs updatesPromise<>due to the nature of web workers while Node returns synchronously, I split the typing toGLPKWebWorkerandGLPKNode.Promise<>#43.terminate()for both version to help memory management. This should help addressing Managing memory for multiple LP instances #45Since I am having a rather faster pace on my main project depending on this. I have included these commits, made them to be v5, and published on https://www.npmjs.com/package/@raenonx/glpk.js.