Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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: 1358
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: Fri Apr 19 11:37:22 CEST 2024

Total time taken to generate the page: 1.08362 seconds