Normalde şöyle yaparız
Runnable fn = () -> {// your code here};Thread thread = new Thread(fn).start();
ofPlatform metodu
Açıklaması şöyle
Actually, there’s a whole fluent API now, as ofPlatform() returns a Thread.Builder.OfPlatform instanceÖrnek
Şöyle yaparız
Thread thread = Thread.ofPlatform()..start(runnable);
Örnek
Şöyle yaparız
Thread thread = Thread.ofPlatform()..daemon() .name("my-custom-thread") .unstarted(runnable);
Hiç yorum yok:
Yorum Gönder