While porting the Pepper Tickling app from the old Python base to the new Android/Java base, I faced a big problem trying to handle the same Say action amongst multiple asynchronous methods.
Futures are objects that wrap asynchronous methods. It allows for asynchronous processing of code despite writing in a sequential manner. [More on Futures here.]
In the official Pepper API documentation, explanations and examples are provided for the use case where one multiple Futures can be used within a single method in order to chain operations together, but within the use case of pepper-tickle
, it was necessary to make use of multiple shared Futures within multiple asynchronous methods, and because REASON THIS IS NOT POSSILE
, this was not possible unless we made use of Atomic Variables.