Open Source • Background Tasks: Itoo 🚀

Well, that's good because I have plenty :slight_smile:

As I read this and other threads, I have become quite confused about background vs foreground processes/tasks/threads.

In your example, "Notification Every Second":

I assume there is a process, "P0", which executes the Button1.Click event, correct? Is it fg or bg? When does it terminate? It would seem to continue, with screen1 being "active" and visible.

Does the Button1.Click event create (via itto1.CreateProcess) a background or foreground process, call it "P1", which then executes procedure "clock"?

Does "P1" run to completion after registering the Clock1.Timer event?

What/which process executes the "timer" procedure when the Clock1.Timer event fires?

I think I will stop there for now.

I should add that this is not just of academic interest. I am aware that some things cannot be done from a background process (or an inactive process - what's the difference. Oops, there's another question:-) . For example, I find that a Notify1.ShowAlert will work from places where a toast ( [Free Open Source] my toast extension 3.0 ) does not - or perhaps there are other problems with my tests that lead me to conclude this.

Kind regards,
Randal