Skip to content
Snippets Groups Projects

[WIP] ProcessorBase multi-threading

Closed Jeremie Deray requested to merge multi_threading into master

[WIP] Depends on !89 (merged) .

Add a ThreadedBaseClass that ProcessorBase inherit from.

It allows the computation of the ProcessorBase::process(...) to be performed in a separated thread. Threads aren't instantiated/killed but instead are put to sleep waiting for new CaptureBase.

ThreadedBaseClass API is rather simple :

  • Constructor with argument max_frequency allowing the user to set guess what, a max frequency at which the processor operates.
  • run() to start the thread and so the processor.
  • stop() allows to stop the thread and so the processor.
  • isRunning() let the user know if the processor is running or not.

Finally it has the pure virtual function :

  • executeImpl() where the derived class do its job.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading