Item 80. ExecutorService
public static void main(String[] args) {
// μμ
ν μμ±(μ±κΈ μ€λ λλ‘ λμ)
ExecutorService exec = Executors.newSingleThreadExecutor();
// μ±νν ν
μ€ν¬ λκΉ
exec.execute(runnable);
// μ€νμ μ’
λ£
exec.shutdown();
}Last updated