Event thread updating guestmetrics expertdating tips info
The issue I had the other day was that I had a timer running in my code that triggers an event when the elapsed time hits a certain time.
Here's an example that just reports a string object: private void button1_Click(object sender, Event Args e) private void background Worker1_Do Work(object sender, Do Work Event Args e) private void background Worker1_Progress Changed( object sender, Progress Changed Event Args e) That's fine if you always want to update the same field.
Programs that ignore this rule may function correctly most of the time, but are subject to unpredictable errors that are difficult to reproduce.
A note on thread safety: It may seem strange that such an important part of the Java platform is not thread safe.
Most code that invokes Swing methods also runs on this thread.
This is necessary because most Swing object methods are not "thread safe": invoking them from multiple threads risks thread interference or memory consistency errors.