orca-robotics


INTRODUCTION
Overview
Download and Install
Documentation

REPOSITORY
Interfaces
Drivers
Libraries
Utilities
Software Map

DEVELOPER
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

hydroiceutil::JobQueue Class Reference

A queue of jobs to be processed. More...

#include <jobqueue.h>

Inherits hydroutil::Uncopyable.

Inherited by hydroiceutil::EventLoop.

Inheritance diagram for hydroiceutil::JobQueue:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 JobQueue (gbxsickacfr::gbxutilacfr::Tracer &tracer, const Config &config=Config())
 ~JobQueue ()
 Calls stop() if any the worker threads are still running.
void stop ()
void add (const JobPtr &job)
 Add request to execute a job. If add() is called after stop(), the request to add a job is quietly ignored.
JobQueueStatus status ()
 Returns current queue status.

Classes

struct  Config
 Job queue configuration structure. More...

Detailed Description

A queue of jobs to be processed.

Rather than tie up the main thread, calls which may take a long time can be placed on this job queue. They will be processed by a pool of threads.

If you need the jobs to communicate results or status updates to their owners, you may want to use the event mechanism,

See also:
Event, EventReceiver.
Author:
Alex Brooks, Alex Makarenko


Constructor & Destructor Documentation

hydroiceutil::JobQueue::JobQueue gbxsickacfr::gbxutilacfr::Tracer &  tracer,
const Config config = Config()
 

Constructor. For queueSizeWarn>0, a warning will be traced when the queue size exceeds specified size.


Member Function Documentation

void hydroiceutil::JobQueue::stop  ) 
 

Stops accepting new jobs, clears all pending jobs, cancels all running jobs and stops the worker pool. Use this function instead of relying on the destructor to call it if you need to make sure that the thread pool is stopped before other objects (e.g. threads) are destroyed.


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

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5