summary refs log tree commit diff stats
path: root/compiler/semthreads.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/semthreads.nim')
-rw-r--r--compiler/semthreads.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/semthreads.nim b/compiler/semthreads.nim
index 595ab0454..eded99325 100644
--- a/compiler/semthreads.nim
+++ b/compiler/semthreads.nim
@@ -380,7 +380,8 @@ proc analyseThreadProc*(prc: PSym) =
   var formals = skipTypes(prc.typ, abstractInst).n
   for i in 1 .. formals.len-1:
     var formal = formals.sons[i].sym 
-    c.mapping[formal.id] = toTheirs # thread receives foreign data!
+    # the input is copied and belongs to the thread:
+    c.mapping[formal.id] = toMine
   discard analyse(c, prc.getBody)
 
 proc needsGlobalAnalysis*: bool =