Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

completablefuture async example

CompletableFuture.runAsync(() -> {
			try {
				TimeUnit.SECONDS.sleep(3);
				System.out.println("I'm special thread "+ContextHolder.getContext());
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		});
 
PREVIOUS NEXT
Tagged: #completablefuture #async
ADD COMMENT
Topic
Name
8+8 =