NAME

OTK_JobQueue - Job queue which understands TK, UNIX signals, time and I/O events.

SYNOPSIS


#include <OTK/dispatch/jobqueue.hh>

class OTK_JobQueue : public OTC_JobQueue
{
  public:
    OTK_JobQueue();
    ~OTK_JobQueue();
    OTC_Job* next();
    virtual OTC_Job* next(int theActions, int theTkActions=0);
    inline int dispatch(int theActions=0);
};

CLASS TYPE

Concrete

DESCRIPTION

OTK_JobQueue is a derived version of OTC_JobQueue which understands how to manage signals, alarms, timers and I/O events, within the UNIX environment. When the next() member function is invoked to return the next job to execute, the class first checks for any signals which may have occurred. If no signals have occurred, a check is made for any alarms which may have expired. Checks are then made for normal jobs, and finally a select() or poll() call is made to check for timer and I/O events. When a request is made for a specific type of job, the valid flags which can OR'ed together are: If OUXLIB_DONT_WAIT is included in the set of flags, the function will return without executing a job if the function would have needed to block in order to get a job. The value 0 can be used to select all event sources, or OUXLIB_DONT_WAIT by itself if all event sources should be select but it shouldn't block.

QUEUEING

OTC_Job* next();
virtual OTC_Job* next(int theActions, int theTkActions=0);

DISPATCH

inline int dispatch(int theActions=0);

SEE ALSO

OTC_JobQueue, OTC_Job, OUXEV_Signal, OTCEV_Alarm, OTCEV_Timeout, OTCEV_IOEvent, OUX_Dispatcher, OTK_JobQueue

LIBRARY

OTK

AUTHOR(S)

Graham Dumpleton

COPYRIGHT

Copyright 1993 TELSTRA CORPORATION LIMITED
Copyright 1994 DUMPLETON SOFTWARE CONSULTING PTY LIMITED