+void MyFrame::OnAsyncTermination(MyProcess *process)
+{
+ m_allAsync.Remove(process);
+
+ delete process;
+}
+
+void MyFrame::AddPipedProcess(MyPipedProcess *process)
+{
+ if ( m_running.IsEmpty() )
+ {
+ // we want to start getting the timer events to ensure that a
+ // steady stream of idle events comes in -- otherwise we
+ // wouldn't be able to poll the child process input
+ m_timerIdleWakeUp.Start(100);
+ }
+ //else: the timer is already running
+
+ m_running.Add(process);
+ m_allAsync.Add(process);
+}
+
+void MyFrame::RemovePipedProcess(MyPipedProcess *process)
+{
+ m_running.Remove(process);
+
+ if ( m_running.IsEmpty() )
+ {
+ // we don't need to get idle events all the time any more
+ m_timerIdleWakeUp.Stop();
+ }
+}