M
MrFile
C#.Net question for everyone
I have a class that has a method that i run async from the Form.
This class has one field string called log. I need this since i have
an event that can write to it sometimes, and not only my async method.
Now im noticing this log seems to be updated by both of the running
threads. Is there any way to resolve this without locking the log
variable and therefore causing my thread to be locked up as well?
I have a class that has a method that i run async from the Form.
This class has one field string called log. I need this since i have
an event that can write to it sometimes, and not only my async method.
Now im noticing this log seems to be updated by both of the running
threads. Is there any way to resolve this without locking the log
variable and therefore causing my thread to be locked up as well?