To implement my splash screen for my app, I’m starting a thread from main thread that sleeps for a while and calls the home intent. And is working fine.
But my concern is Do we need to wait on main thread? (Currently I’m not doing this)
If main thread finishes first, what will happen and how to handle that scenario?
Thanks,
Venkat
The main thread itself cannot be “waited on”. The application cannot exit while there are still non-daemon child threads still running.
If you set the child threads to be daemons prior to starting them, they will be immediately terminated when the application exits.