T
Tom Jastrzebski
Here is the scenario:
There are two methods: SetupMethod() and AccessMethod().
1. Only one thread at a time can execute SetupMethod().
2. AccessMethod() can be executed by any number of threads but when
SetupMethod() is executed other threads have to wait.
3. SetupMethod() can not be started when AccessMethod() executes. It needs
to place a lock on AccessMethod() and wait until all other threads are
finish.
How the above can be accomplished?
Tom
There are two methods: SetupMethod() and AccessMethod().
1. Only one thread at a time can execute SetupMethod().
2. AccessMethod() can be executed by any number of threads but when
SetupMethod() is executed other threads have to wait.
3. SetupMethod() can not be started when AccessMethod() executes. It needs
to place a lock on AccessMethod() and wait until all other threads are
finish.
How the above can be accomplished?
Tom