Multi-threading causes race condition when resolving hangover duration
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Tái hiện vấn đề từ cuối tutorial với tính năng đa luồng được bật và so sánh với dispatcher/mod.rs khi tính năng đa luồng bị tắt. Kiểm tra initiative_system.rs và encumbrance_system.rs trong trình gỡ lỗi, tập trung vào hiệu ứng trạng thái Hangover đã bị xóa và dữ liệu vẫn được cung cấp từ datastore. Được xem là hoàn tất khi encumbrance_system.rs quan sát thấy các bộ sửa đổi trạng thái chính xác sau khi thực thể bị xóa, kể cả khi các thuộc tính thay đổi lần nữa.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Running the project from the end of the tutorial.
initiative_system.rs:
Visually verified the code in my project matches the source code from the last chapter of the tutorial.
Stepped through with debugger and code executes as expected. The equipment changed component is added to the player entity and the status effect is deleted from the entities list.
encumbrance_system.rs:
Visually verified the relevant code in my project matches the source code from the last chapter of the tutorial.
Stepped through with debugger and code does not execute as expected. In the section where status effects are calculated, the "Hangover" status effect data is still being served from the datastore after the Status Effect entity has been deleted from the entities list in initiative_syste.rs (visually inspected in the debugger.)
Turning multi-threading off by commenting out the multi-threading pre-processor code in dispatcher/mod.rs fixes the problem.
When the player has an event that changes the attribute bonus again, the data in encumbrance_system.rs is serving the correct status modifiers (inspected in debugger).
It appears that multi-threading is causing the encumbrance system code to execute after the status effect entity is deleted but before the corresponding status effect modifies have been removed from the datastore.
- Ngôn ngữ chính
- Rust
- Star
- 967
- Fork
- 166
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 amethyst/rustrogueliketutorial
-
Wrong typing in chapter 57aĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
-
[RESOLVED] Wayland IssueĐang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 45/100
Tất cả issue của amethyst/rustrogueliketutorial
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
stellar/stellar-cli#2773 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
voidzero-dev/oxc-angular-compiler#511 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 86/100
yantrikos/yantrik-os#539 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation station:mac ui-dashboard
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
rolter-ai/rolter#2490 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày