I was looking for an asynchronous way of setting a variable and notify the possible listeners that the variable is now available.
C++ has a great API for this use case called std::future (wait
and set_value
). But the Future's of Java are completely different...
Is there an alternative API in Java that accomplished the same behavior like in C++?
Aucun commentaire:
Enregistrer un commentaire