I created a mutlithreaded simulator that relies heavily on a native message passing between threads (don't tell me to skip one thread for my D dissertation, and I need to get this to work)
after a very long kludge, including many castings of objects in shared and vice versa. who had pretty ugly race condition errors. I decided to create an opaque type representing an object that can receive messages that can be transmitted without any casting ...
no such luck
struct OpaqueFaseSim{ Tid tid; void send(...){...} } void foo(){ Tid tid; long time; OpaqueFaseSim ofs;
why can I pass a Tid, but not a structure containing only Tid?
and how can i fix it
source share