Commit 0e3b61fe authored by gsamain's avatar gsamain

Add is_empty to queue interface

parent 99e489d6
...@@ -552,6 +552,14 @@ def inject_acthon_interfaces(self): ...@@ -552,6 +552,14 @@ def inject_acthon_interfaces(self):
queue_activate_entry.is_variable = 1 queue_activate_entry.is_variable = 1
queue_scope.var_entries.append(queue_activate_entry) queue_scope.var_entries.append(queue_activate_entry)
queue_is_empty_type = PyrexTypes.CFuncType(PyrexTypes.c_bint_type, [], nogil = 1)
queue_is_empty_type.is_const_method = 1
queue_is_empty_entry = queue_scope.declare("is_empty", "is_empty",
queue_activate_type, None, "extern")
queue_is_empty_entry.is_cfunction = 1
queue_is_empty_entry.is_variable = 1
queue_scope.var_entries.append(queue_is_empty_entry)
# cdef cypclass ActivableClass: # cdef cypclass ActivableClass:
# ResultInterface (*_active_result_class)() # ResultInterface (*_active_result_class)()
# QueueInterface _active_queue_class # QueueInterface _active_queue_class
......
...@@ -104,6 +104,7 @@ ...@@ -104,6 +104,7 @@
struct ActhonQueueInterface : public CyObject { struct ActhonQueueInterface : public CyObject {
virtual void push(ActhonMessageInterface* message) = 0; virtual void push(ActhonMessageInterface* message) = 0;
virtual int activate() = 0; virtual int activate() = 0;
virtual int is_empty() const = 0;
}; };
struct ActhonActivableClass : public CyObject { struct ActhonActivableClass : public CyObject {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment