new concurrency model: first steps; shared is not a keyword anymore

This commit is contained in:
Araq 2014-04-14 08:45:43 +02:00
commit b961e47bfe
13 changed files with 67 additions and 22 deletions

View file

@ -0,0 +1,22 @@
discard """
errormsg: "shared memory may not refer to GC'ed thread local memory"
line: 14
"""
type
Region = object
Foo = Region ptr int
MyObject = object
a, b: string
Bar[T] = shared ptr T
Bzar = Bar[MyObject]
proc bar(x: Region ptr int) =
discard
var
s: Foo
bar s