I have: class DataSignal : Thread { public: static int dataReadDelay; void run() { while (true) { Thread.sleep(dur!"msecs"(dataReadDelay)); // Read in the new file data } } } in main I have: DataSignal.dataReadDelay = 8000; // initialize a bunch of signalsThen when each thread is running they sleep for 0 seconds, and I can verify that dataReadDelay is staying at 0. I have initialized it no where else. This seems like a major bug.
Unable to set static data member of a class (results in default value 0)
Enjoys Math via Digitalmars-d-learn Sun, 27 Aug 2017 15:26:50 -0700
- Unable to set static data member ... Enjoys Math via Digitalmars-d-learn
- Re: Unable to set static dat... Adam D. Ruppe via Digitalmars-d-learn
- Re: Unable to set static... Jonathan M Davis via Digitalmars-d-learn