mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-29 04:17:55 +01:00
Updated Event c'tor to accept an enum.
This commit is contained in:
@@ -43,7 +43,7 @@ public:
|
||||
ActiveResultHolder():
|
||||
_pData(0),
|
||||
_pExc(0),
|
||||
_event(false)
|
||||
_event(Event::EVENT_MANUALRESET)
|
||||
/// Creates an ActiveResultHolder.
|
||||
{
|
||||
}
|
||||
@@ -149,7 +149,7 @@ class ActiveResultHolder<void>: public RefCountedObject
|
||||
public:
|
||||
ActiveResultHolder():
|
||||
_pExc(0),
|
||||
_event(false)
|
||||
_event(Event::EVENT_MANUALRESET)
|
||||
/// Creates an ActiveResultHolder.
|
||||
{
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
_runnable(*pOwner, method),
|
||||
_stopped(true),
|
||||
_running(false),
|
||||
_done(false)
|
||||
_done(Event::EVENT_MANUALRESET)
|
||||
/// Creates the activity. Call start() to
|
||||
/// start it.
|
||||
{
|
||||
|
||||
@@ -46,11 +46,23 @@ class Foundation_API Event: private EventImpl
|
||||
/// for an event to become signalled.
|
||||
{
|
||||
public:
|
||||
Event(bool autoReset = true);
|
||||
enum EventType
|
||||
{
|
||||
EVENT_MANUALRESET = EVENT_MANUALRESET_IMPL, /// Manual reset event
|
||||
EVENT_AUTORESET = EVENT_AUTORESET_IMPL, /// Auto-reset event
|
||||
};
|
||||
|
||||
Event(EventType type = EVENT_AUTORESET);
|
||||
/// Creates the event. If type is EVENT_AUTORESET,
|
||||
/// the event is automatically reset after
|
||||
/// a wait() successfully returns.
|
||||
|
||||
Event(bool autoReset);
|
||||
//@ deprecated
|
||||
/// Creates the event. If autoReset is true,
|
||||
/// the event is automatically reset after
|
||||
/// a wait() successfully returns.
|
||||
|
||||
|
||||
~Event();
|
||||
/// Destroys the event.
|
||||
|
||||
|
||||
@@ -31,8 +31,15 @@ namespace Poco {
|
||||
|
||||
class Foundation_API EventImpl
|
||||
{
|
||||
public:
|
||||
enum EventTypeImpl
|
||||
{
|
||||
EVENT_MANUALRESET_IMPL,
|
||||
EVENT_AUTORESET_IMPL,
|
||||
};
|
||||
|
||||
protected:
|
||||
EventImpl(bool autoReset);
|
||||
EventImpl(EventTypeImpl type);
|
||||
~EventImpl();
|
||||
void setImpl();
|
||||
void waitImpl();
|
||||
|
||||
@@ -30,8 +30,15 @@ namespace Poco {
|
||||
|
||||
class Foundation_API EventImpl
|
||||
{
|
||||
public:
|
||||
enum EventTypeImpl
|
||||
{
|
||||
EVENT_MANUALRESET_IMPL,
|
||||
EVENT_AUTORESET_IMPL,
|
||||
};
|
||||
|
||||
protected:
|
||||
EventImpl(bool autoReset);
|
||||
EventImpl(EventTypeImpl type);
|
||||
~EventImpl();
|
||||
void setImpl();
|
||||
void waitImpl();
|
||||
|
||||
@@ -30,8 +30,15 @@ namespace Poco {
|
||||
|
||||
class Foundation_API EventImpl
|
||||
{
|
||||
public:
|
||||
enum EventTypeImpl
|
||||
{
|
||||
EVENT_MANUALRESET_IMPL,
|
||||
EVENT_AUTORESET_IMPL,
|
||||
};
|
||||
|
||||
protected:
|
||||
EventImpl(bool autoReset);
|
||||
EventImpl(EventTypeImpl type);
|
||||
~EventImpl();
|
||||
void setImpl();
|
||||
void waitImpl();
|
||||
|
||||
@@ -120,7 +120,7 @@ private:
|
||||
thread(0),
|
||||
prio(PRIO_NORMAL_IMPL),
|
||||
policy(SCHED_OTHER),
|
||||
done(false),
|
||||
done(Event::EVENT_MANUALRESET),
|
||||
stackSize(POCO_THREAD_STACK_SIZE),
|
||||
started(false),
|
||||
joined(false)
|
||||
|
||||
Reference in New Issue
Block a user