Commit 353defdc authored by gsamain's avatar gsamain Committed by Xavier Thompson

Add is_empty to queue interface

parent d462e9f0
......@@ -552,6 +552,14 @@ def inject_acthon_interfaces(self):
queue_activate_entry.is_variable = 1
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:
# ResultInterface (*_active_result_class)()
# QueueInterface _active_queue_class
......
......@@ -104,6 +104,7 @@
struct ActhonQueueInterface : public CyObject {
virtual void push(ActhonMessageInterface* message) = 0;
virtual int activate() = 0;
virtual int is_empty() const = 0;
};
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