Apra-Labs / ApraPipes

A pipeline framework for developing video and image processing application. Supports multiple GPUs and Machine Learning tooklits
MIT License
28 stars 33 forks source link

Control module thread handling issues #384

Closed mraduldubey closed 1 month ago

mraduldubey commented 2 months ago

Describe the bug We add control module in a pipeline via the PipeLine interface using addControlModule method.

To Reproduce Steps to reproduce the behavior:

  1. Create a pipeline
  2. add control module
  3. wait for all
  4. Repeat 10 times in same process, see the number of threads /behaviour

Expected behavior We should handle the pipeline end for control module gracefully

mraduldubey commented 1 month ago

More comment:

  1. We should handle control module thread specially in the following way:
    • Start it separately (in init(), start() & run_all_threaded())
    • DO NOT pause/play it in PipeLine::pause() / PipeLine::play() because we need control module running even when pipeline is paused for it to process commands
    • Handle it separately in PipeLine::stop() & PipeLine::wait_for_all() methods
mraduldubey commented 1 month ago

I am working on this on md/controlModulePipelineFixes Will also do the following:

  1. Register health callback extention
  2. Add tests for simple control module
  3. Fix pipeline related bugs