new concurrency model: first steps; shared is not a keyword anymore
This commit is contained in:
parent
817337af30
commit
b961e47bfe
13 changed files with 67 additions and 22 deletions
22
tests/typerel/tno_gcmem_in_shared.nim
Normal file
22
tests/typerel/tno_gcmem_in_shared.nim
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue