代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/iSulad 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From f90a145d9d29682295aebf2bcd30865ee5f6491f Mon Sep 17 00:00:00 2001
From: jikai <[email protected]>
Date: Tue, 2 Apr 2024 07:53:54 +0000
Subject: [PATCH 42/69] fix message queue concurrent bug
Signed-off-by: jikai <[email protected]>
---
src/daemon/mailbox/message_queue.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/daemon/mailbox/message_queue.c b/src/daemon/mailbox/message_queue.c
index 7fe044f2..7e53301e 100644
--- a/src/daemon/mailbox/message_queue.c
+++ b/src/daemon/mailbox/message_queue.c
@@ -106,11 +106,12 @@ message_queue *message_queue_create(void (*release)(void *))
return NULL;
}
- bq = blocking_queue_create(BLOCKING_QUEUE_NO_TIMEOUT, release);
- if (bq == NULL) {
+ mq->messages = blocking_queue_create(BLOCKING_QUEUE_NO_TIMEOUT, release);
+ if (mq->messages == NULL) {
ERROR("Failed to create events queue");
return NULL;
}
+ bq = mq->messages;
mq->subscribers = map_new(MAP_PTR_INT, MAP_DEFAULT_CMP_FUNC, message_queue_subscriber_free);
if (mq->subscribers == NULL) {
@@ -131,7 +132,7 @@ message_queue *message_queue_create(void (*release)(void *))
return NULL;
}
- mq->messages = isula_transfer_ptr(bq);
+ bq = NULL;
return isula_transfer_ptr(mq);
}
--
2.34.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。