Added after 4 minutes:
this is because what you code you do in constructor is done in the calling thread. The code in run will be executed in the new thread after start() is called. timers dont work well across thread boundaries so you either need to instantiate the timer in run() or use moveTothread() in run to move the timer.hmm..this whole situation is definitely a bit weird..cuz the documentation should mention that any kind of initialization done in the constructor would not take any effect when the thread is actually run..and although it makes sense that run method should have all the initialization, one can always make a mistake of initializing in constructor being a C++ developer....any guru thoughts on this?
that is ridiculous :-/
Bookmarks