-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
cannot create a FlowVar[ tuple[a: string] ] #11717
Comments
it's worth noting that this works with https://github.com/yglukhov/threadpools :) |
This still shows up in Nim v1.4.2; is there an intended workaround for this, short of using the linked version of threadpools? |
Nope, official threadpool is sorta unmaintained by now. Alternatives includes https://github.com/mratsim/weave and https://github.com/yglukhov/threadpools |
Hm. I can definitely work around it or use an alternative for my use case... But for future reference (both for me and those who encounter this issue in the future), given that, are there future plans to remove/replace the current Nim standard library threadpool implementation? Particularly since one of the linked implementations appears to not support |
AFAIK weave will be the future. ARC supports will come after we got |
It seems to work with import threadpool
proc test(): tuple[a: string] =
return (a: "flowvar string tuple")
let a = spawn test()
sync()
echo typeof(a)
echo ^a
|
Attempting to create a
FlowVar[ tuple[ a: string ] ]
fails with:test.nim(6, 15) Error: cannot create a flowVar of type: tuple[a: string]
Creating a
FlowVar[string]
directly works.Creating a
FlowVar
of atuple
with fields of any other type works. Only tuples containing strings seem to fail.This was discovered by attempting to use
execCmdEx()
from theOsProc
module withspawn
.Example
The text was updated successfully, but these errors were encountered: