I have something along this way: struct json_value { .. }
function DoDirSearch(..) { immutable json_value cbk = json_value(prms.argv[3]); assert(cbk != json_value.init); // OK, pass import core.thread; new Thread({ assert(cbk != json_value.init); // FAIL! }).start(); }the problem is, my struct value is not saved in the spawned tread context, so this assert fails while at the start it passed:
assert(cbk != json_value.init);