What is parallel/asynchronous programming?
Why program asynchronously or in parallel?
In Week 7 we discussed concurrency, synchronisation and the Singleton Pattern - ways of managing the issues arise when programming in parallel.
Today, we'll discuss applications of asynchronous programming in software design.
The primary application is Event-Driven Programming and the Observer Pattern.
https://www.digitalocean.com/community/tutorials/understanding-the-event-loop-callbacks-promises-and-async-await-in-javascript
const element = document.getElementById("myBtn");
element.addEventListener("click", myFunction);
function myFunction(event) {
console.log(event.target.value)
}
List<Integer> ints =
strings2.stream()
.map(Integer::parseInt)
.collect(Collectors.toList());