-
Notifications
You must be signed in to change notification settings - Fork 28
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
Truly sequencial execution is hard (all existing iterators are concurrent) #754
Comments
Always use
|
Not just
|
At RuntimeIs it possible to somehow guarantee at runtime level that node won't receive a message until it will send result? Problems
|
This problem better described at #857 |
Previous node doesn't wait for the next one to finish its work, before doing next task. Example: in "99 bottles" problem it's unsafe to use range with for
99..-1 -> for
. Neva-like pseudocode:Imagine this sequence of events:
99
is sent fromrange
it received byfirstLine
firstLine
printed the line and sent99
tosecondLine
98
is send fromrange
and received byfirstLine
firstLine
prints the line beforesecondLine
prints 99 <--- RACEsecondLine
finally prints the line, but order already messed upThis is completely possible (e.g. scheduler awakes
secondLine
to late), and even more than that - this is expected (and generally desired) behaviour. This is basically what implicit concurrency is. Previous node starts to work on next task as soon as possible, without waiting for its downstream node to finish whatever he's busy with at the moment.Might be related to #666 and #711, as well as #723 and #739
The text was updated successfully, but these errors were encountered: