Seems like you need inter process communication. There are many ways to make one. For example, through sockets. You may use D bindings to ZMQ or other library, or just use std.socket. Anyway the process will be represented by the whole program, not just one function as in case of thread.