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 » Thread calls GUI
Re: Thread calls GUI [message #20099 is a reply to message #20086] Tue, 17 February 2009 15:57 Go to previous messageGo to previous message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

How about to add semaphore method dword Semaphore::Wait(int timeout)?

in win32 is simple:
int Semaphore::Wait( int timeout )
{
	dword result_value;
	result_value = WaitForSingleObject(handle, timeout);
	if(result_value == WAIT_FAILED) return(SEMAPHORE_WAIT_ERROR);
	if(result_value == WAIT_TIMEOUT) return(SEMAPHORE_TIMEOUT);
}


but in POSIX is more hardly.
The good article found here.

I think it have sense on i have a postcallback and i know maximum execution time. Or I'm wrong?
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: StaticMutex/ONCELOCK question
Next Topic: GUI MT project does not compile
Goto Forum:
  


Current Time: Wed Apr 24 23:38:20 CEST 2024

Total time taken to generate the page: 0.41218 seconds