Skip to content

Instantly share code, notes, and snippets.

@yetti
Last active July 2, 2020 01:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yetti/dad234d08a1deb032e9400100349b0e6 to your computer and use it in GitHub Desktop.
Save yetti/dad234d08a1deb032e9400100349b0e6 to your computer and use it in GitHub Desktop.
Notes on non-blocking REST
https://www.javacodegeeks.com/2015/07/understanding-callable-and-spring-deferredresult.html
suppyAsync() - supply task pool executor as 2nd param
whenAsyncComplete() - set result of promise
thenCompose() - to add new tasks
poolsize: Runtime.getRuntime().availableProcessors() + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment