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

Actor pool "join" returns too early #71

Closed
jeberger opened this issue Dec 3, 2011 · 2 comments
Closed

Actor pool "join" returns too early #71

jeberger opened this issue Dec 3, 2011 · 2 comments

Comments

@jeberger
Copy link

jeberger commented Dec 3, 2011

If one of the actions already running tries to send a new action to the pool after the main thread has called join, then the new actions may not get called.

import actors

var
  a: TActorPool[int, void]
createActorPool(a)

proc task (i: int) {.thread.} =
  echo i
  if i != 0: a.spawn (i-1, task)

a.spawn (10, task)
a.join()

This code should print all numbers between 0 and 10 in no particular order, instead it only prints "10".

@Araq Araq closed this as completed in 8ffb785 Dec 5, 2011
@Araq Araq reopened this Dec 10, 2011
@Araq
Copy link
Member

Araq commented Dec 10, 2011

Reopened because tests indicate it still works not reliable.

@Araq
Copy link
Member

Araq commented Dec 31, 2011

Closing for now, tests appear to fail because of output capturing issues.

@Araq Araq closed this as completed Dec 31, 2011
reactormonk pushed a commit to reactormonk/nim that referenced this issue Apr 7, 2014
krux02 pushed a commit to krux02/Nim that referenced this issue Jan 11, 2022
71: Deal with remaining disabled tests r=saem a=canelhasmateus



Co-authored-by: Mateus <mateus.canelhas@gmail.com>
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

2 participants