Skip to content

Some minor fixes to actors examples#2401

Merged
privat merged 4 commits intonitlang:masterfrom
BlackMinou:actors
Apr 5, 2017
Merged

Some minor fixes to actors examples#2401
privat merged 4 commits intonitlang:masterfrom
BlackMinou:actors

Conversation

@BlackMinou
Copy link
Copy Markdown
Contributor

Tried to follow @tremblay-guy commentaries on #2361 to improve the code of the actors examples

Signed-off-by: BlackMinou <romain.chanoir@viacesi.fr>
Signed-off-by: BlackMinou <romain.chanoir@viacesi.fr>

var i = count.length - 1
while i > 0 do
for i in [0..(count.length - 1)].reverse_iterator do
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[0..count.length[?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol I'm dumb haha !

end
end
for j in [0..i] do p[j] = if j + d <= i then pp[j+d] else pp[j+d-i-1]
i -= 1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove this line.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no ...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i is set at the next iteration of the for loop anyway... Or is there something I'm missing?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wasnt looking at the same line hahahah, you're right

Signed-off-by: BlackMinou <romain.chanoir@viacesi.fr>
Signed-off-by: BlackMinou <romain.chanoir@viacesi.fr>
@BlackMinou BlackMinou force-pushed the actors branch 2 times, most recently from fd81ee7 to beffce2 Compare April 3, 2017 14:57
@BlackMinou BlackMinou mentioned this pull request Apr 3, 2017
privat added a commit that referenced this pull request Apr 5, 2017
Tried to follow @tremblay-guy commentaries on #2361  to improve the code of the actors examples

Pull-Request: #2401
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
privat added a commit that referenced this pull request Apr 5, 2017
This fixes an issue with the actor model where the GC is unable to collect cycles associated with actors objects and printing an annoying warning

Theses modifs should fix the tests in #2401

The downside is that the finalization is no longer in topological order

Pull-Request: #2404
@privat privat merged commit beffce2 into nitlang:master Apr 5, 2017
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

Successfully merging this pull request may close these issues.

3 participants