Skip to content
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

Question: node-fibers API using async/await #443

Open
meggarr opened this issue Aug 3, 2020 · 3 comments
Open

Question: node-fibers API using async/await #443

meggarr opened this issue Aug 3, 2020 · 3 comments

Comments

@meggarr
Copy link

meggarr commented Aug 3, 2020

Hello,

With respects to node-fibers, I have been using Meteor JS for several month. MeteorJS gave me a lot of convenience to develop webapps. I noticed that OBSOLESCENCE NOTICE that new projects should use async/await instead of node-fibers. This means for projects like Meteor, it will need an effort to refactor and move to async/await. I am not sure if there's an easier way that can implement node-fibers API using async/await features, if that can be done, it will help Meteor to async/await easily.

Thanks and regards,

@laverdet
Copy link
Owner

laverdet commented Aug 3, 2020

The fact is that the JS ecosystem as a whole has overwhelmingly chosen async/await over fibers. There may still be a niche community for fibers but my opinion is that it is a mistake to write new code which depends on fibers. Like I mentioned in the note, I will continue to support fibers for as long as technically possible-- so Meteor users don't need to panic. Obsolescence is actually the longest of the stages of software lifecycle 😇

@opyh
Copy link

opyh commented Jan 4, 2021

@laverdet I have to admit I panic a bit: more node modules are beginning to use WASM+GC, which isn't working with fibers. Using them leads to to 'archived threads in combination with wasm not supported' errors. From my understanding, the only 'workaround' so far is to switch off WASM+GC which causes another issue (exploding RAM usage).

Do you have any pointers how we could fix this?

Is there an alternative way to keep fibers functionality without 'hacking the thread-local storage to trick V8 into thinking it's running separate threads/isolates' (Quote source)?

@laverdet
Copy link
Owner

laverdet commented Jan 6, 2021

@opyh this error message comes directly from v8 -- v8/v8@e937bc5

v8 sees fibers as archived threads, there's frankly no way around it. You will need to track down someone on the v8 team and convince them to implement what looks to be a major feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants