MCPcopy Create free account
hub / github.com/acl-dev/acl / push

Method push

lib_acl_cpp/include/acl_cpp.cn/stdlib/tbox.hpp:77–91  ·  view source on GitHub ↗

* ������Ϣ���� * @param t {T*} �ǿ���Ϣ���� * @param notify_first {bool} ���Ϊ true������֪ͨ������������Ƚ��� * ��֪ͨ��ע����ߵ����� * @return {bool} * @override */

Source from the content-addressed store, hash-verified

75 * @override
76 */
77 bool push(T* t, bool notify_first = true) {
78 if (! lock_.lock()) { abort(); }
79 tbox_.push_back(t);
80 size_++;
81
82 if (notify_first) {
83 if (! cond_.notify()) { abort(); }
84 if (! lock_.unlock()) { abort(); }
85 } else {
86 if (! lock_.unlock()) { abort(); }
87 if (! cond_.notify()) { abort(); }
88 }
89
90 return true;
91 }
92
93 /**
94 * ������Ϣ����

Callers

nothing calls this directly

Calls 4

lockMethod · 0.45
push_backMethod · 0.45
notifyMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected