why use wait_for_termination method will stuck the code
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 30/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- ruby
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Ruby
- スター
- 5.8k
- フォーク
- 420
- 平均マージ
- 20時間 45分
- マージ済み PR(30日)
- 4
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ruby-concurrency/concurrent-ruby のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
ruby-concurrency/concurrent-ruby#1118 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
ruby-concurrency/concurrent-ruby#1099 · コメント 9 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
ruby-concurrency/concurrent-ruby#1095 · コメント 8 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
ruby-concurrency/concurrent-ruby#1093 · コメント 3 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
ruby-concurrency/concurrent-ruby#1091 ·
ruby-concurrency/concurrent-ruby の issue をすべて見る
似ている issue
-
バグ
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
voxpupuli/puppet-epel#186 · コメント 1 件 ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) オープンBug Frontend
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
TheOdinProject/curriculum#31402 · コメント 1 件 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100