-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Drop the changes to variables in async functions #20
Comments
If anyone wants this fixed, mention or add reaction here. |
I love what you did. As I understand - the values do not change in the global fish scope. I think the exported variables to be immutable, it is a lot more classical approach, safe and most practical design choice. This way it is much easier to keep the main thread & async running very robustly and for everyone to be happy. When you add a backward sharing of values - it would have an effect of complicating all work, reports, cases further. Everything is working (I have my complex setup & exported to async a bit of side-processes) now. I think the I would say the obvious things that you already know. If global scope is immutable - async processes can import & shadow variables over with local copies, mutate local values for themself and do what they want - they are containerized, those changes not be exported into global fish scope. This approach allows most things needed by people & simplifies async greatly, makes it robust, easy to run and works for all main cases. And if a person requires - have a switch that allows mutating the global scope values. And you would see how many people need that and what are the cases & how much those cases valid. And you would always have a possibility to state that mutable mode can be dangerous & are you providing support for it & are contributions welcome. |
e.g.
The above don't increment.
The text was updated successfully, but these errors were encountered: