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

Spawn test fails to compile with gc:arc #13983

Closed
Kartiku opened this issue Apr 15, 2020 · 4 comments
Closed

Spawn test fails to compile with gc:arc #13983

Kartiku opened this issue Apr 15, 2020 · 4 comments

Comments

@Kartiku
Copy link
Contributor

Kartiku commented Apr 15, 2020

Code fails to compile with --gc:arc.

Example

import threadpool

proc foo(): seq[int] =
  newSeq[int]()

let t  = spawn foo()
echo ^t

Current Output

d:\d\test2.nim(6, 16) template/generic instantiation of `nimCreateFlowVar` from here
C:\Users\user\.choosenim\toolchains\nim-#devel\lib\pure\concurrency\threadpool.nim(214, 6) Error: cannot bind another '=destroy' to: FlowVarObj; previous declaration was constructed here implicitly: C:\Users\user\.choosenim\toolchains\nim-#devel\lib\pure\concurrency\threadpool.nim(211, 48)

Expected Output

@[]

Additional Information

  • Works as expected with default gc
  • perhaps related to this post?
$ nim -v
Nim Compiler Version 1.3.1 [Windows: amd64]
Compiled at 2020-04-14
Copyright (c) 2006-2020 by Andreas Rumpf

git hash: 2c93d1684e44dcec160083eafd1144e4ddeb0ad8
active boot switches: -d:release
@cooldome
Copy link
Member

Fixed in #13897, but blocked by #13935

@cooldome
Copy link
Member

Should be fixed now in latest devel. Could you please retest?

@Araq
Copy link
Member

Araq commented Apr 17, 2020

Works for me too, closing.

@Araq Araq closed this as completed Apr 17, 2020
@Kartiku
Copy link
Contributor Author

Kartiku commented Apr 17, 2020

Was waiting for the nightly build so i can use choosenim. Works for me. Thank you @cooldome

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

No branches or pull requests

4 participants