[Documentation] [TitleIndex] [WordIndex


There are also a few methods for setting thread/process priorities.

Cross Platform Support

Currently the windows code is available, but not currently present (need to port it from the old version of ecl) because it isn't getting used/tested frequently. It can be added back in when and as needed quickly as the framework is still in place.

Compiling & Linking

Include the following at the top of any translation unit:

   1 #include <ecl/threads.hpp>
   3 // The thread classes
   4 using ecl::Mutex;
   5 using ecl::Thread;
   6 using ecl::Threadable;
   8 // Priorities
   9 using ecl::set_priority;
  10 using ecl::get_priority;
  11 using ecl::print_priority_diagnostics;
  12 using ecl::BackgroundPriority;
  13 using ecl::LowPriority;
  14 using ecl::NormalPriority;  
  15 using ecl::HighPriority;    
  16 using ecl::CriticalPriority;
  17 using ecl::RealTimePriority1;   
  18 using ecl::RealTimePriority2;   
  19 using ecl::RealTimePriority3;   
  20 using ecl::RealTimePriority4;   

If using catkin with ROS, you should make sure to declare a dependency on ecl_threads in your package.xml and find_package ecl_threads in your CMakeLists.txt:

find_package(catkin REQUIRED COMPONENTS
   # other dependencies ...

If outside ros, you will also need to link to ecl_threads.


2024-07-20 13:20