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

CreateThread doesn't accept functions with generics #43

Closed
AzureKitsune opened this issue Jul 28, 2011 · 0 comments
Closed

CreateThread doesn't accept functions with generics #43

AzureKitsune opened this issue Jul 28, 2011 · 0 comments

Comments

@AzureKitsune
Copy link
Contributor

My code -> https://gist.github.com/1110749 (although, the code was altered for issue #42)
When you try to pass a function to createThread, if it depends on generics for one of its arguments, the compiler will not accept it.

parallel.nim(24, 17) Error: type mismatch: got (TThread[TThreadFuncArgs[int]], proc(TThreadFuncArgs[int]), TThreadFuncArgs[int])
but expected one of:
createThread(t: var TThread[TMsg], tp: proc (TMsg){.thread.}, param: TMsg)
createThread(t: var TThread[TMsg], tp: proc (){.thread.})
@Araq Araq closed this as completed in 26ab647 Aug 7, 2011
reactormonk pushed a commit to reactormonk/nim that referenced this issue Apr 7, 2014
Araq added a commit that referenced this issue Dec 18, 2016
krux02 pushed a commit to krux02/Nim that referenced this issue Jan 11, 2022
43: [DOC] Language specification tests r=saem a=haxscramper



Co-authored-by: haxscramper <haxscramper@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