the big renamefest: first steps
This commit is contained in:
parent
014b79617e
commit
dbf9117c56
56 changed files with 529 additions and 508 deletions
|
|
@ -1,11 +1,13 @@
|
|||
discard """
|
||||
output: '''foobarfoobarbazbearbazbear'''
|
||||
output: '''foobarfoobar
|
||||
bazbearbazbear
|
||||
1'''
|
||||
cmd: "nimrod $target --threads:on $options $file"
|
||||
"""
|
||||
|
||||
import threadpool
|
||||
|
||||
proc computeSomething(a, b: string): string = a & b & a & b
|
||||
proc computeSomething(a, b: string): string = a & b & a & b & "\n"
|
||||
|
||||
proc main =
|
||||
let fvA = spawn computeSomething("foo", "bar")
|
||||
|
|
@ -15,3 +17,19 @@ proc main =
|
|||
|
||||
main()
|
||||
sync()
|
||||
|
||||
|
||||
type
|
||||
TIntSeq = seq[int]
|
||||
|
||||
proc t(): TIntSeq =
|
||||
result = @[1]
|
||||
|
||||
proc p(): int =
|
||||
var a: FlowVar[TIntSeq]
|
||||
parallel:
|
||||
var aa = spawn t()
|
||||
a = aa
|
||||
result = (^a)[0]
|
||||
|
||||
echo p()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue