U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ MT-multithreading and servers » StaticMutex/ONCELOCK question
icon5.gif  StaticMutex/ONCELOCK question [message #19927] Tue, 03 February 2009 06:28 Go to previous message
Novo is currently offline  Novo
Messages: 1432
Registered: December 2006
Ultimate Contributor
I couldn't understand completely several things with StaticMutex and ONCELOCK.

StaticMutex will never call destructor of a contained Mutex object. Is this meant to be?

#define ONCELOCK \
for(static volatile bool o_b_; !ReadWithBarrier(o_b_);) \
	for(static StaticMutex o_ss_; !o_b_;) \
		for(Mutex::Lock o_ss_lock__(o_ss_); !o_b_; BarrierWrite(o_b_, true))


How the above code actually works? Rolling Eyes

TIA


Regards,
Novo
 
Read Message icon5.gif
Read Message
Read Message
Read Message
Previous Topic: HTTP Agent & WebSSL memory leak
Next Topic: Thread calls GUI
Goto Forum:
  


Current Time: Tue Jun 16 22:34:46 GMT+2 2026

Total time taken to generate the page: 0.00717 seconds