Home » U++ Library support » U++ MT-multithreading and servers » MT/Locking Questions
Re: MT/Locking Questions [message #15560 is a reply to message #15529] |
Tue, 29 April 2008 10:03 |
mr_ped
Messages: 825 Registered: November 2005 Location: Czech Republic - Praha
|
Experienced Contributor |
|
|
Well, I never did MT with U++, so I have no direct experience, but that's what makes *sense* to me.
Thinking more about it, the instantiated non-static mutex may be enough, if the multiple threads are working with the same instance of the class with the accessed static variable, but that imposes additional burden on mind of programmer, to never introduce another instance.
Anyway, a search trough files in uppsrc leads to these interesting lines:
C:\upp\uppsrc\Core\heap.cpp(115):static StaticMutex sHeapLock;
C:\upp\uppsrc\Core\Mt.cpp(9): static Mutex *section;
C:\upp\uppsrc\Draw\Draw.cpp(9):static StaticMutex sDrawLock;
As you can see, there's some StaticMutex class also. I'm looking at the source right now, but I have still no idea why ordinary Mutex would be not good enough even for static variable of class.
Sorry.
|
|
|
|
|
MT/Locking Questions
By: captainc on Mon, 28 April 2008 15:23
|
|
|
Re: MT/Locking Questions
By: mirek on Mon, 28 April 2008 19:41
|
|
|
Re: MT/Locking Questions
By: captainc on Mon, 28 April 2008 20:00
|
|
|
Re: MT/Locking Questions
By: mr_ped on Mon, 28 April 2008 20:57
|
|
|
Re: MT/Locking Questions
By: captainc on Mon, 28 April 2008 22:10
|
|
|
Re: MT/Locking Questions
By: mr_ped on Tue, 29 April 2008 10:03
|
|
|
Re: MT/Locking Questions
By: mirek on Tue, 29 April 2008 19:09
|
|
|
Re: MT/Locking Questions
By: mr_ped on Tue, 29 April 2008 21:49
|
|
|
Re: MT/Locking Questions
By: mirek on Wed, 30 April 2008 10:51
|
|
|
Re: MT/Locking Questions
By: mr_ped on Wed, 30 April 2008 16:04
|
|
|
Re: MT/Locking Questions
By: mirek on Wed, 30 April 2008 21:05
|
Goto Forum:
Current Time: Fri Sep 20 07:30:25 CEST 2024
Total time taken to generate the page: 0.04233 seconds
|