mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-06 16:56:45 +08:00
fix wrong word
This commit is contained in:
parent
7d91b187fe
commit
b3ad167970
@ -29,7 +29,7 @@ public:
|
||||
queue(void) = default;
|
||||
|
||||
explicit queue(array_t* arr) : queue() {
|
||||
attch(arr);
|
||||
attach(arr);
|
||||
}
|
||||
|
||||
queue(queue&& rhs) : queue() {
|
||||
@ -61,7 +61,7 @@ public:
|
||||
return elems_->disconnect();
|
||||
}
|
||||
|
||||
array_t* attch(array_t* arr) {
|
||||
array_t* attach(array_t* arr) {
|
||||
if (arr == nullptr) return nullptr;
|
||||
auto old = elems_;
|
||||
elems_ = arr;
|
||||
@ -89,7 +89,7 @@ public:
|
||||
|
||||
T pop(void) {
|
||||
if (elems_ == nullptr) throw std::invalid_argument {
|
||||
"This queue hasn't connected to any elem_array."
|
||||
"This queue hasn't attached any elem_array."
|
||||
};
|
||||
while (cursor_ == elems_->cursor()) {
|
||||
std::this_thread::yield();
|
||||
|
||||
@ -196,7 +196,7 @@ struct test_cq<ipc::circ::queue<T>> {
|
||||
cn_t connect(void) {
|
||||
cn_t queue;
|
||||
[&] {
|
||||
queue.attch(ca_);
|
||||
queue.attach(ca_);
|
||||
QVERIFY(queue.connect() != ipc::error_count);
|
||||
} ();
|
||||
return queue;
|
||||
@ -314,7 +314,7 @@ void Unit::test_queue(void) {
|
||||
QVERIFY(sizeof(decltype(queue)::array_t) <= sizeof(*cq__));
|
||||
|
||||
auto cq = ::new (cq__) decltype(queue)::array_t;
|
||||
queue.attch(cq);
|
||||
queue.attach(cq);
|
||||
QVERIFY(queue.detach() != nullptr);
|
||||
|
||||
test_prod_cons<1, 3>((ipc::circ::queue<msg_t>*)nullptr);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user