Two issues with Worker demo
- Ngôn ngữ chính
- C++
- Star
- 1.1k
- Fork
- 80
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
1) `fib.js` [default export](https://github.com/Geequlim/ECMAScriptDemos/blob/ca86889abfcd5518ed49b8f3eacf9fc4cefd91d4/worker/fib.js#L1) is `fib` function and not a godot class, so every time the file is loaded i get an error message "modules/ECMAScript/ecmascript.cpp:92 - JavaScript Error". Is this how it is supposed to be right now (work in progress)? So for now to avoid this message on every save one should export some empty class inheriting `godot.Object`?
2) This one is less straightforward. When i press "Calculate in Worker" the playing scene just exits without any error ("Calculate in Main Thread" works fine). I tested different things and it seems like there is a stack overflow in worker thread on my machine when [`N`](https://github.com/Geequlim/ECMAScriptDemos/blob/ca86889abfcd5518ed49b8f3eacf9fc4cefd91d4/worker/Control.js#L3) is higher than 26. Even when `fib` is a simple function as `(n) => n < 2 ? n : fib( n - 1 )`. With 26 or lower worker is fine. Any clues what this might be caused by? What is the maximum N on your machine if you use the provided simple function?
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện cả hai báo cáo trong bản demo worker, sau đó đọc worker/fib.js và worker/Control.js, đặc biệt là default export và giá trị N được worker sử dụng trong phép tính. Được xem là hoàn tất khi lỗi JavaScript lặp lại và việc thoát khỏi scene do worker kích hoạt đã được giải thích và sửa, đồng thời các đường dẫn Calculate in Main Thread và Calculate in Worker vẫn hoạt động như mong đợi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript
- Lĩnh vực
- game-dev
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100