daehwan2yo / msa-playground

MSA 를 멀티모듈기반으로 연습합니다.
2 stars 0 forks source link

Supplier vs Callable #14

Open daehwan2yo opened 2 years ago

daehwan2yo commented 2 years ago

Mono 를 공부하다보면 Mono.fromSupplier() / Mono.fromCallable() 이렇게 두가지 static method 를 발견할 수 있다.

둘 다 Functional Interface 로, body 의 구성도 같다. Supplier -> V get(); Callable -> V call();

둘의 차이는 무엇일까?