why use wait_for_termination method will stuck the code
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
- 30/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- ruby
- Lĩnh vực
- distributed-systems
Hướng nghiên cứu
Start with the thread_pool.shutdown and thread_pool.wait_for_termination calls in the issue's example, then investigate the worker's ClassFactory.create_dynamic_model call under Ruby with concurrent-ruby 1.2.0 and no concurrent-ruby-ext. Reproduce the hang on Linux and establish why the worker does not finish; done means the supplied workload terminates without leaving wait_for_termination stuck.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
user_ids,org,delete_restore = get_org_and_user(delete_restore_id)
return unless user_ids.present?
work_num = [user_ids.length,50].min
thread_pool = Concurrent::FixedThreadPool.new(work_num)
error_map = Concurrent::Map.new
redis_key = RedisClient::DDRS_BULK_DELETE_KEY % org.id ## TODO
set_redis_total_num(redis_key,user_ids.length)
user_ids.each do |id|
thread_pool.post do
#delete_single_user(id,error_map,redis_key)
target_class = ClassFactory.create_dynamic_model("zendmodo", "privacy_settings", true)
puts id
puts target_class
end
end
thread_pool.shutdown
thread_pool.wait_for_termination
the wait_for_termination method will stuck the following code
target_class = ClassFactory.create_dynamic_model("zendmodo", "privacy_settings", true)
- Operating system: linux
- Ruby implementation: Ruby
concurrent-rubyversion: 1.2.0concurrent-ruby-extinstalled: noconcurrent-ruby-edgeused: no
- Ngôn ngữ chính
- Ruby
- Star
- 5.8k
- Fork
- 420
- Merge trung bình
- 20 giờ 45 phút
- Pull request đã merge (30 ngày)
- 4
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 ruby-concurrency/concurrent-ruby
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
ruby-concurrency/concurrent-ruby#1118 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
ruby-concurrency/concurrent-ruby#1099 · 9 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
ruby-concurrency/concurrent-ruby#1095 · 8 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
ruby-concurrency/concurrent-ruby#1093 · 3 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
ruby-concurrency/concurrent-ruby#1091 ·
Tất cả issue của ruby-concurrency/concurrent-ruby
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
バグ
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
Version bump for OpenVox 9 Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
voxpupuli/puppet-epel#186 · 1 bình luận ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) Đang mởBug Frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100