running multiple futures started checking if is even checking if is even checking if is even checking if is even checking if is even checking if is even false true false false true true done as you can see from this output although the six futures were started in sequence the results returned are in different order (with the returned order being and finally processing future results using callback an alternative to the as_complete(approach is to provide function that will be called once result has been generated this has the advantage that the main program is never pausedit can continue doing whatever is required of it the function called once the result is generated is typically known as callback functionthat is the future calls back to this function when the result is available each future can have separate call back as the function to invoke is set on the future using the add_done_callback(method this method takes the name of the function to invoke for examplein this modified version of the previous examplewe specify call back function that will be used to print the futures result this call back function is called print_future_result(it takes the future that has completed as its argument