Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
この質問で述べたように、スレッド内での自動ロードは問題を引き起こす可能性があります。どのような回避策を適用できますか?
スレッドを生成する前に、必要なクラスを含むファイルを単に要求することができます。単純に autorequires を使用するよりも、実行するのに少し手間がかかりますが、ここでは必要です。
こうすることで、競合状態のためにクラスが複数のスレッドにロードされることを回避できます。
const_missingプラスミューテックスを使用して、独自のロールを作成できます。
const_missing