You can do
     private Unshared!(S*) s;
     this(){ s = new S(1); }

Yeah, there are workarounds, also some other minor issues. For example, I wanted to use it with a pointer type, and then take the pointer of that (don't ask me: C library), and I had to find a workaround for this as well.

My point is that:

1) It's not transparent, not even remotely clear how to get this working.
2) It should be if shared is to be used. If shared is to be disowned / left as it is, then there needs to be an alternative to casting voodoo because right now doing "manual" multithreading is hell.

A.

Reply via email to