Andrew Wiley <> changed:

           What    |Removed                     |Added
           Platform|Other                       |All
            Summary|std.parallelism             |std.parallelism's Task
                   |                            |cannot handle immutable
                   |                            |values
         OS/Version|Windows                     |All

--- Comment #1 from Andrew Wiley <> 2011-08-31 22:39:40 PDT 
When creating Tasks to run on a TaskPool using std.parallelism, it looks like I
can't call functions that have immutable objects:

import std.parallelism;

class Test {

void doSomething(immutable(Test) test) {

void main() {
        immutable(Test) test = new immutable(Test)();

compiler output:
Error: can only initialize const member __args_field_0 inside constructor
Error: this is not mutable
/usr/include/d2/4.6.0/std/parallelism.d:734: Error: template instance
std.parallelism.Task!(doSomething,immutable(Test)) error instantiating
tasktest.d:11:        instantiated from here:

Is this something that can be fixed, or does this depend on having tail const
support (which would hopefully work for immutable as well)? This use case seems
particularly important as immutability is the simplest way to ensure safe

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to