We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b2609b commit bff386fCopy full SHA for bff386f
1 file changed
core/shared/utils/bh_queue.c
@@ -96,14 +96,15 @@ bh_queue_destroy(bh_queue *queue)
96
bool
97
bh_post_msg2(bh_queue *queue, bh_queue_node *msg)
98
{
99
+ bh_queue_mutex_lock(&queue->queue_lock);
100
+
101
if (queue->cnt >= queue->max) {
102
queue->drops++;
103
bh_free_msg(msg);
104
+ bh_queue_mutex_unlock(&queue->queue_lock);
105
return false;
106
}
107
- bh_queue_mutex_lock(&queue->queue_lock);
-
108
if (queue->cnt == 0) {
109
bh_assert(queue->head == NULL);
110
bh_assert(queue->tail == NULL);
0 commit comments