Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GCS: Change asynchronous launch policy to default to avoid having to …
…take care of exceptions on oversubscription ================================================================================================================ std:async can take two policies one that forces the task to be run in parallel another (deferred) that runs the task when wait is called on the future (kind of lazy evaluation). Default policy is let the system decide (an or of both policies). Nobody is a better position than the system to know its load and whether it is possible to run the task in parallel or not. If the system cannot allocate a thread and parallel processing is enforced (as before this commit), then it will throw an exception. In the present case we would catch it and run the task sequencially. Thus, it makes sense to let the system decide from the beginning and save the exception and the handling. In tests I have only managed to see it run in parallel with the default policy.
- Loading branch information