All the runScheduledAction complexity seems to be redundant
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
- 25/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- haskell
- Lĩnh vực
- distributed-systems
Hướng nghiên cứu
Bắt đầu bằng cách so sánh các commit được tham chiếu 3855e91 và 876a3dc, sau đó theo dõi runScheduledAction và sendOn để hiểu các đảm bảo về thứ tự xung quanh MVar. Xác định xem độ phức tạp của việc lập lịch có dư thừa hay không và ghi lại một phạm vi cụ thể, có thể kiểm thử trước khi thay đổi nó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Simply doing
thingToSend <- modifyMVar (....)
send thingToSendis not good enough, because now if we have to threads doing the above the sends
may be done in the wrong order.
Before https://github.com/haskell-distributed/network-transport-tcp/commit/876a3dc94e516c9ec60ea8b0a65ea3f13b8c1f27 it was true. But after sendOn was protected with MVar it seems that it became redundant, because, as @simonmar states in his book:
if a thread T is blocked in takeMVar and there are regular putMVar operations on the same MVar, it is guaranteed that at some point thread T’s takeMVar will return. In GHC, this guarantee is implemented by keeping blocked threads in a FIFO queue attached to the MVar...
In other words, the first thread called sendOn and blocked on MVar will be served first when the MVar will be available (if I understood correctly the book). So it seems that "simply doing" approach mentioned in the beginning will just do. No?
CC @edsko
- Ngôn ngữ chính
- Haskell
- Star
- 754
- Fork
- 101
- Merge trung bình
- 1 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không 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 haskell-distributed/distributed-process
-
enhancement Feature Request
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
haskell-distributed/distributed-process#486 · 1 bình luận · 1 reaction ·
-
discuss enhancement Feature Request
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
haskell-distributed/distributed-process#478 · 4 bình luận · 3 reaction ·
-
enhancement Feature Request
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
haskell-distributed/distributed-process#476 · 2 reaction ·
-
Demonstrating the use of Cloud Haskell for a Raft implementationCó thể làm lại được @LaurentRDC đã nhận 487 ngày trước và không có pull request nào đang mở. Đang mởenhancement Feature Request
haskell-distributed/distributed-process#475 · 3 reaction · 1 người được giao ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
haskell-distributed/distributed-process#473 · 4 bình luận · 1 reaction ·
Tất cả issue của haskell-distributed/distributed-process
Issue tương tự
-
newcomers
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
JacquesCarette/Drasil#5591 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
`unsafeReleaseAll` throws `ResourceRegistryUsedFromUntrackedThread` when called from an untracked threadCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
-
Support webmanifest MIME typeĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Vim-mode indent crashes: monaco-vim's browser build inlines monaco-editor 0.33Có thể đã có người làm @x-labb đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
compiler-explorer/compiler-explorer#9402 ·
Maintainer thường phản hồi trong vòng 1 ngày