simple js class to manage asynchronous (and paralle) execution