Home » U++ Library support » U++ MT-multithreading and servers » MT app hangs
Re: MT app hangs [message #24024 is a reply to message #24022] |
Thu, 17 December 2009 21:15 |
mdelfede
Messages: 1307 Registered: September 2007
|
Ultimate Contributor |
|
|
Well... now I'm running out of ideas !
Why this
// calculation thread function
void CalcPage::DoCalculation(void)
{
// gets the status bar
StatusBar &sb = ((Lamell *)(GetMainWindow()))->GetStatusBar();
{
GuiLock __;
sb.Set("Calcolo in corso");
}
calcAborted = !Calculate();
{
GuiLock __;
if(calcAborted)
sb.Set("Errore");
else
sb.Set("Pronto");
}
}
// modify handler -- triggers page calculation
// (triggered by button)
void CalcPage::ModifyCb(void)
{
PostCallback(THISBACK(CalcAgainCb));
}
// callback in case modify handler is re-entered when
// calc thread still working
void CalcPage::CalcAgainCb(void)
{
if(!calcThread.IsOpen())
// restarts the calculation if thread not already working
calcThread.Run(THISBACK(DoCalculation));
// otherwise repost calculation for later
else
PostCallback(THISBACK(CalcAgainCb));
}
doesn't work ???
It just runs calc thread once, so I guess IsOpen() always returns true.... so, thread still blocked somewhere.
Ciao
Max
|
|
|
Goto Forum:
Current Time: Wed May 08 23:15:24 CEST 2024
Total time taken to generate the page: 0.02323 seconds
|