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.
@async 呼び出しを行い、Future 型フィールドの値を取得すると、Spring でスレッドがどうなるかを知りたいです。その間、スレッドはアイドル状態ですか?
よろしくお願いします、ゴンザ。
メソッドを呼び出した直後にスレッドが開始されます@Async。Futureインスタンスを使用して、現在のステータスを確認できます - isDone()。get()または、スレッドが完了するまでブロックする呼び出しを行うこともできます。
@Async
Future
isDone()
get()