B
Brad Wood
As I'm studying up on threading, I'm reading about the various
mechanisms in place to serialize access to various objects. From what I
can tell, the following scenario is safe:
- Create multiple instances of a class.
- Create a thread for each instance passing it a delegate of one of the
class' methods.
- Run each thread which will:
- Modify member variables of the instance
- Read from AppSettings
- Read from a database that basically maintains static data
- Not touch any other kind of global data.
Is this safe?
mechanisms in place to serialize access to various objects. From what I
can tell, the following scenario is safe:
- Create multiple instances of a class.
- Create a thread for each instance passing it a delegate of one of the
class' methods.
- Run each thread which will:
- Modify member variables of the instance
- Read from AppSettings
- Read from a database that basically maintains static data
- Not touch any other kind of global data.
Is this safe?