aboutsummaryrefslogtreecommitdiff
path: root/src/shared/DelayExecutor.h
diff options
context:
space:
mode:
authorn0n4m3 <none@none>2009-12-17 07:34:00 +0100
committern0n4m3 <none@none>2009-12-17 07:34:00 +0100
commit2028f0658b2bb95e2390aba8fd995271fe4e41d6 (patch)
tree0b468a4234b90588e7b7e799b7581b57800add2d /src/shared/DelayExecutor.h
parent8507b7da9902303189e9d01c8c23d1aaf8d656bd (diff)
Removed mtmaps OpenMP
Implement mtmaps based on ACE For stable work MapUpdate.Threads=2 in config --HG-- branch : trunk
Diffstat (limited to 'src/shared/DelayExecutor.h')
-rw-r--r--src/shared/DelayExecutor.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/shared/DelayExecutor.h b/src/shared/DelayExecutor.h
new file mode 100644
index 00000000000..7a160d5ec92
--- /dev/null
+++ b/src/shared/DelayExecutor.h
@@ -0,0 +1,33 @@
+#ifndef _M_DELAY_EXECUTOR_H
+#define _M_DELAY_EXECUTOR_H
+
+#include <ace/Task.h>
+#include <ace/Activation_Queue.h>
+#include <ace/Method_Request.h>
+
+class DelayExecutor : protected ACE_Task_Base
+{
+ public:
+ DelayExecutor();
+ virtual ~DelayExecutor();
+
+ static DelayExecutor* instance();
+
+ int execute(ACE_Method_Request* new_req);
+
+ int activate(int num_threads = 1, ACE_Method_Request* pre_svc_hook = 0, ACE_Method_Request* post_svc_hook = 0);
+
+ int deactivate();
+
+ bool activated();
+
+ virtual int svc(void);
+ private:
+ ACE_Activation_Queue queue_;
+ ACE_Method_Request* pre_svc_hook_;
+ ACE_Method_Request* post_svc_hook_;
+
+ void activated(bool s);
+ bool activated_;
+};
+#endif // _M_DELAY_EXECUTOR_H