[Feature Request] Zero-length queues (a.k.a. rendezvous queues)
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 12/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- c
- Lĩnh vực
- embedded-iot, operating-systems
Hướng nghiên cứu
The request concerns queue.c, where the cited check rejects a queue length of zero at creation. Read how xQueueReceive and xQueueSend block and wake waiting tasks before changing anything. Done would mean a zero-length queue can be created and a blocking receive pairs with a non-blocking send, with no buffering. The thread has no maintainer decision yet, so agree on the semantics first.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem? Please describe.
I want to send data from task A to task B, but only if the receiving task B is already waiting for the data. Using a FreeRTOS queue does not work for this use-case because they have require a length greater than zero, meaning 1 data element would be buffered (which I do not want, for reasons of memory usage and latency).
Describe the solution you'd like
Queues should allow for their maximum number of elements to be zero. A zero-length queue does not buffer any elements, but only transfers data when a send and receive call pair up. This is sometimes referred to as a "rendezvous queue". Rust's crossbeam-channel implementation describes this as follows:
A special case is zero-capacity channel, which cannot hold any messages. Instead, send and receive operations must appear at the same time in order to pair up and pass the message over.
In my problem, the receiving task would loop with a blocking call to xQueueReceive(queue, buffer, portMAX_DELAY); when it is done processing the previous data item, the producer A uses xQueueSend(queue, buffer, 0);, that is, non-blocking. This means some data items are not transferred from A to be, which is fine in my use-case.
Describe alternatives you've considered
I tried work-arounds using semaphores but this is very tricky to get right without subtle race conditions. If there is a way to implement this using already available synchronization primitives I'd be happy to hear about that!
- Ngôn ngữ chính
- C
- Star
- 4.6k
- Fork
- 1.6k
- Merge trung bình
- 2 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của FreeRTOS/FreeRTOS-Kernel
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
FreeRTOS/FreeRTOS-Kernel#1542 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
[BUG] Release asset FreeRTOS-KernelV11.3.2.zip has the files of main, not of the tag V11.3.2Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
FreeRTOS/FreeRTOS-Kernel#1520 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
FreeRTOS/FreeRTOS-Kernel#1494 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
FreeRTOS/FreeRTOS-Kernel#1554 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
[BUG] event_wait_timed can't return falseCó thể đã có người làm @TedLyngmo đã nhận 39 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 38/100
FreeRTOS/FreeRTOS-Kernel#1546 ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của FreeRTOS/FreeRTOS-Kernel
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 63/100
FreeRTOS/FreeRTOS-Plus-TCP#1395 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
qoretechnologies/qore#8222 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
c easy first-contributor first-contributors good first issue help wanted up-for-grabs
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 96/100
fork-commit-merge/fork-commit-merge#8696 ·
Maintainer thường phản hồi trong vòng 1 ngày