Is it possible to monitor Pipeline tasks somehow? I tried to add monitors to each task like this
FPipeline := Parallel.Pipeline()
.Stage(StageWorker1, Parallel.TaskConfig.MonitorWith(MyMonitor))
.NumTasks(MaxReadThreadCount)
.Stage(StageWorker2, Parallel.TaskConfig.MonitorWith(MyMonitor))
.Run();
but getting the exception "Task can be only monitored with a single monitor" (as I understand, it happens because the internal hidden monitor is already installed for pipeline stages).
Use Parallel.TaskConfig.OnMessage and provide a common message processing function.
MessageProc
can be a normal procedure or a method.