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 » Community » Newbie corner » Shutdown procedure by clicking red x
Re: Shutdown procedure by clicking red x [message #37776 is a reply to message #30374] Sun, 11 November 2012 20:32 Go to previous messageGo to previous message
crydev is currently offline  crydev
Messages: 151
Registered: October 2012
Location: Netherlands
Experienced Member
I have the same problem and I am looking for a solution. I tried the things posted here but I cannot solve the problem. My problem is that my program will always be using only 1 thread for the operation needed. (meaning GUI + 1 extra thread) Besides that, my thread performs tasks located in another class which are called by one main function. I don't have any blocking threads so using loops and volatile variables will not get me any further I think.

My code is as following:

void ButtonClicked() // This function is the button event
{
    Thread().Run(THISBACK1(RunImdbSearchAsync, row));
}
void RunImdbSearchAsync(int row) // Thread tasks
{
    ImdbManager im;
    im.WhenImdbMovie = THISBACK(ImdbMovieFound);
    im.ImdbSearch(mMovieList.Get(row, 0)); // This is a function that wraps around three tasks:
                                           // 1. Retrieving HTML using HttpRequest;
                                           // 2. Parsing HTML using Regular Expression;
                                           // 3. Creating an object containing the parsed data and returning it.
    PostCallback(THISBACK(AfterImdbSearch));
}


What would help for my situation? When I click the red cross to close my application while the thread above is still running I get an access violation.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Copy\Paste Between Project Files Doesn't work
Next Topic: Error meaning
Goto Forum:
  


Current Time: Mon Apr 28 04:58:21 CEST 2025

Total time taken to generate the page: 0.04587 seconds