http://d.puremagic.com/issues/show_bug.cgi?id=10108
--- Comment #15 from Simen Kjaeraas <[email protected]> 2013-05-21 12:41:56 PDT --- (In reply to comment #14) > import core.thread; > int[] arr = [1,2,3].dup; > > void main() { > auto t = new Thread({arr[0] = 3;}); > t.start(); > t.join(); > assert(arr[0] == 1); > } > > The .dup should fix the problem, as now each thread gets its own copy of the > array, right? It's still being done at compile time, so no. It basically creates a copy at compile time, then stores that in the data segment instead of the original. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
