Heiko hat folgendes geschrieben: |
Hello,
I think it can, but IMHO it is senseless, because if you have started a critical sections it is the once running thread of your programm. If you start in this section an other critical section it doesn't change this state. It means, no other threads will be stopped, because all threads are allready stopped.
yours sincerely
Heiko |
Nothing stops, when you enter a critical section! A critical section is an object, that manages a simple state. If you have an object, you need access to from different threads, each thread has to use the CS-object to state that it requires exclusive access to something. What this "something" is, is what you have to define!
So, there is no problem in using multiple CS, as long as you know which CS is for what kind of access and you implement the usage of the required CS in your code.