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 » MT assertion failed in IsST()
Re: MT assertion failed in IsST() [message #9917 is a reply to message #9915] Fri, 08 June 2007 15:45 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13984
Registered: November 2005
Ultimate Member
OK, I quickly reviewed the code and...

void DownloadThread(CallerInfo caller)
{
	caller.app->isProgressCanceled = false;

	String result;
	result << "Download started, timeout is set to 30 seconds...";
	caller.app->downloadResult.Set(result);
	caller.app->tab.RefreshFrame();


is MT broken -> first, U++ does not allow to call GUI related things from other than the main thread (we the exception of callback queue). And even if it would, you would still need some mutex for caller.app.

Solution: Instead of calling caller.app methods directly, use callback queue; calling SetTimeCallback is legal at any moment (queue is serialized - there is mutex inside). Set the delay parameter = 0 so that it gets invoked at first oportunity.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: https - how to?
Next Topic: Again ReadMemoryBarrier() etc
Goto Forum:
  


Current Time: Wed Jun 05 04:34:08 CEST 2024

Total time taken to generate the page: 0.02827 seconds