Under Windows this works fine but under Linux I got a runtime error.

this could be reduced to :

---
import std.parallelism;

alias CallBack = void function(void*);

class Foo
{
    CallBack clbck;
    void* param;
    void dotask()
    {
        // some heavy processing
        // tells the caller that some fresh data are available
        if(clbck) clbck(param);  // debugger breaks HERE
    }

    void call()
    {
        task(&dotask).executeInNewThread;
// returns directly but the caller will get a notif when finished
    }
}
---

more info about the environment:
- linux i386
- the D program is actually a .so and the main thread is the exe that loads this .so.
- If i don't use a Task then the program works **fine**.

Is it possible to achieve this in a cross platform-way ?
How can i get in phase with the main big thread at the end of my task ?

Reply via email to