Switch to unified view

a/src/index/rclmon.h b/src/index/rclmon.h
...
...
30
 * multiple events to the same file.
30
 * multiple events to the same file.
31
 */
31
 */
32
#include <time.h>
32
#include <time.h>
33
#include <string>
33
#include <string>
34
#include <map>
34
#include <map>
35
#include <mutex>
35
36
36
#include "rclconfig.h"
37
#include "rclconfig.h"
37
38
38
#ifndef NO_NAMESPACES
39
#ifndef NO_NAMESPACES
39
using std::string;
40
using std::string;
...
...
76
class RclEQData;
77
class RclEQData;
77
class RclMonEventQueue {
78
class RclMonEventQueue {
78
 public:
79
 public:
79
    RclMonEventQueue();
80
    RclMonEventQueue();
80
    ~RclMonEventQueue();
81
    ~RclMonEventQueue();
81
    /** Unlock queue and wait until there are new events. 
82
    /** Wait for event or timeout. Returns with the queue locked */
82
     *  Returns with the queue locked */
83
    bool wait(int secs = -1, bool *timedout = 0);
83
    std::unique_lock<std::mutex> wait(int secs = -1, bool *timedout = 0);
84
    /** Unlock queue */
84
    /** Add event. */
85
    bool unlock();
86
    /** Lock queue. */
87
    bool lock();
88
    /** Lock queue and add event. */
89
    bool pushEvent(const RclMonEvent &ev);
85
    bool pushEvent(const RclMonEvent &ev);
90
    void setTerminate(); /* To all threads: end processing */
86
    /** To all threads: end processing */
87
    void setTerminate(); 
91
    bool ok();
88
    bool ok();
92
    bool empty();
89
    bool empty();
93
    RclMonEvent pop();
90
    RclMonEvent pop();
94
    void setopts(int opts);
91
    void setopts(int opts);
95
92