Skip to content

Threading Model

Dusan Ciric edited this page Dec 15, 2017 · 3 revisions

Threading Model Running the RX Platform

#include "lib/rx_job.h"
// includes "lib/rx_thread.h"
using namespace rx::threads;
using namespace rx::jobs;

RX Platform in current version (Atom Ver 0.5.13) uses the following threading regarded base classes:

class thread : public locks::waitable  
{
  public:
      thread();
      thread (const string_type& name);
      virtual ~thread();
      void start (int priority = RX_PRIORITY_NORMAL);

...

}

...


class job : private pointers::reference_object  
{
	DECLARE_REFERENCE_PTR(job);
  public:
      job();
      virtual ~job();
      void cancel ();
      bool is_canceled () const;
      virtual void process () = 0;
      const rx_security_handle_t get_security_context () const;
      const rx_thread_handle_t get_destination () const;

...

}

There are three basic type of threads in the RX Platform:

  • I/O Threads
  • Job Threads
  • Timers