프로그래밍 검색 블로그

clojure 스레드 본문

clojure기초

clojure 스레드

코딩조무사 2017. 11. 4. 11:44

1
2
3
 
(let [t (new Thread #(print "in thread"))]
     (. t start))
cs


스레드를 만들어서 스레드 안에서 호출하는 부분이다

이 코드는 다음과 같은 자바 코드와 유사하다 


1
2
Thread t = new Thread(()->System.out.println("in thread"));
t.start();
cs



'clojure기초' 카테고리의 다른 글

clojure dotimes  (0) 2017.11.05
clojure promise  (0) 2017.11.04
clojure 오버로딩 2 (defmulti / defmethod)  (0) 2017.10.29
clojue fibonacci / lazy-seq  (0) 2017.10.29
clojue fibonacci / memoize  (0) 2017.10.29
Comments