Callback when thread is done?


After a thread objects run() function is completed can I get a callback on the main thread?  I am trying to do splash screen and the JUCE docs say to do

void MyApp::initialise (const String& commandLine)
splash = new SplashScreen ("Welcome to my app!",
ImageFileFormat::loadFrom (File ("/foobar/splash.jpg")),
// now kick off your initialisation work on some kind of thread or task, and
void MyApp::myInitialisationWorkFinished()
// ..assuming this is some kind of callback method that is triggered when
// your background initialisation threads have finished, and it's time to open
// your main window, etc..
splash->deleteAfterDelay (RelativeTime::seconds (4), false);


But I dont see a way to trigger a callback after the thread is done?


Sure, if you trigger one. Maybe use an AsyncUpdater or callAsync