Synchronous fs asynchronous
Synchronous = blocking
Asyn = non-blocking, code executes immediately
Why use async?
Better user experience
What is a thread?
A path of execution of a group of statements
What is multithreading?
Like hafing another cpu to execute code
Name 3 multithreading problems
Deadlock
Race conditions
Starfation
What are Lambdas?
Anon functions
Like arrow functions
What is CompletableFutures used for?
Used to multithread
What should you use completable futures?
I/O bound operations: Db calls, API calls
Parallel processing: Large datasets
Responsife UI
When shouldn’t you use completable futures?
Short lifed operations
Operations that inherently block
When oferusing threads