[1] The goal is to introduce concurrency, by using asynchronous method invocation and a scheduler for handling requests.
[4] Firstly we can see a standard class that provides two methods that set a double to be a certain value.
The class is dangerous in a multithreading scenario because both methods can be called simultaneously, so the value of val (which is not atomic—it's updated in multiple steps) could be undefined—a classic race condition.
You can, of course, use synchronization to solve this problem, which in this trivial case is easy.
[5] To rewrite this class as an active object, you could do the following: Another example of active object pattern in Java instead implemented in Java 8 providing a shorter solution.