Subordination
A framework for distributed programming
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
sbn::basic_socket_pipeline< T > Class Template Referenceabstract
Inheritance diagram for sbn::basic_socket_pipeline< T >:
[legend]
Collaboration diagram for sbn::basic_socket_pipeline< T >:
[legend]

Public Types

typedef basic_handler handler_type
 
typedef std::shared_ptr< handler_typeevent_handler_ptr
 
typedef std::unordered_map< sys::fd_type, event_handler_ptrhandler_container_type
 
typedef handler_container_type::const_iterator handler_const_iterator
 
typedef handler_type::clock_type clock_type
 
typedef handler_type::time_point time_point
 
typedef handler_type::duration duration
 
typedef Proxy_pipeline_base< T > base_pipeline
 
typedef T kernel_type
 
typedef Mutex mutex_type
 
typedef Lock lock_type
 
typedef Semaphore sem_type
 
typedef Kernels kernel_pool
 
- Public Types inherited from sbn::basic_pipeline< T, Kernels, Traits, Threads, Mutex, Lock, Semaphore >
typedef T kernel_type
 
typedef Kernels kernel_pool
 
typedef Threads thread_pool
 
typedef Mutex mutex_type
 
typedef Lock lock_type
 
typedef Semaphore sem_type
 
typedef Traits traits_type
 
- Public Types inherited from sbn::pipeline_base
typedef std::chrono::system_clock clock_type
 
typedef clock_type::time_point time_point
 
typedef clock_type::duration duration
 

Public Member Functions

 basic_socket_pipeline (basic_socket_pipeline &&rhs) noexcept
 
 basic_socket_pipeline (const basic_socket_pipeline &)=delete
 
basic_socket_pipelineoperator= (const basic_socket_pipeline &)=delete
 
void set_other_mutex (mutex_type *rhs) noexcept
 
mutex_type * other_mutex () noexcept
 
mutex_type * mutex () noexcept
 
- Public Member Functions inherited from sbn::basic_pipeline< T, Kernels, Traits, Threads, Mutex, Lock, Semaphore >
 basic_pipeline (unsigned concurrency) noexcept
 
 basic_pipeline (basic_pipeline &&rhs) noexcept
 
 basic_pipeline (const basic_pipeline &)=delete
 
basic_pipelineoperator= (const basic_pipeline &)=delete
 
void send (kernel_type *k)
 
void send (kernel_type **kernels, size_t n)
 
void start ()
 
void stop ()
 
void wait ()
 
unsigned concurrency () const noexcept
 
- Public Member Functions inherited from sbn::pipeline_base
 pipeline_base (pipeline_base &&)=default
 
 pipeline_base (const pipeline_base &)=delete
 
pipeline_baseoperator= (pipeline_base &)=delete
 
void setstate (pipeline_state rhs) noexcept
 
pipeline_state state () const noexcept
 
bool is_starting () const noexcept
 
bool has_started () const noexcept
 
bool is_running () const noexcept
 
bool is_stopping () const noexcept
 
bool has_stopped () const noexcept
 
time_point start_time_point () const noexcept
 
bool has_start_time_point () const noexcept
 
const char * name () const noexcept
 
void set_name (const char *rhs) noexcept
 
void set_number (unsigned rhs) noexcept
 
template<class ... Args>
void log (const Args &... args) const
 
void log_error (const std::exception &err) const
 

Protected Member Functions

sem_type & poller () noexcept
 
const sem_type & poller () const noexcept
 
void emplace_handler (const sys::epoll_event &ev, const event_handler_ptr &ptr)
 
template<class X >
void emplace_handler (const sys::epoll_event &ev, const std::shared_ptr< X > &ptr)
 
void emplace_notify_handler (const event_handler_ptr &ptr)
 
template<class X >
void emplace_notify_handler (const std::shared_ptr< X > &ptr)
 
void do_run () override
 
void run (Thread_context *) override
 
void set_start_timeout (const duration &rhs) noexcept
 
virtual void process_kernels ()=0
 
- Protected Member Functions inherited from sbn::basic_pipeline< T, Kernels, Traits, Threads, Mutex, Lock, Semaphore >
void xstop ()
 

Protected Attributes

handler_container_type _handlers
 
duration _start_timeout = duration::zero()
 
- Protected Attributes inherited from sbn::basic_pipeline< T, Kernels, Traits, Threads, Mutex, Lock, Semaphore >
kernel_pool _kernels
 
thread_pool _threads
 
mutex_type _mutex
 
sem_type _semaphore
 
- Protected Attributes inherited from sbn::pipeline_base
volatile pipeline_state _state = pipeline_state::initial
 
time_point _start = time_point(duration::zero())
 
const char * _name = "ppl"
 
unsigned _number = 0
 

Additional Inherited Members

- Protected Types inherited from sbn::basic_pipeline< T, Kernels, Traits, Threads, Mutex, Lock, Semaphore >
typedef std::vector< std::unique_ptr< kernel_type > > kernel_sack
 
typedef queue_pop_iterator< kernel_pool, traits_type > queue_popper
 

Member Function Documentation

◆ run()

template<class T>
void sbn::basic_socket_pipeline< T >::run ( Thread_context )
inlineoverrideprotectedvirtual

do nothing with the context, because we can not reliably garbage collect kernels sent from other nodes

Reimplemented from sbn::basic_pipeline< T, Kernels, Traits, Threads, Mutex, Lock, Semaphore >.


The documentation for this class was generated from the following file: