diff --git a/vdirsyncer/cli.py b/vdirsyncer/cli.py index a703a91..06ef421 100644 --- a/vdirsyncer/cli.py +++ b/vdirsyncer/cli.py @@ -234,14 +234,12 @@ def _main(env, file_cfg): if processes == 1: cli_logger.debug('Not using multiprocessing.') - _map = map + map(_sync_collection, actions) else: cli_logger.debug('Using multiprocessing.') from multiprocessing import Pool p = Pool(processes=general.get('processes', 0) or len(actions)) - _map = p.map - - _map(_sync_collection, actions) + p.map_async(_sync_collection, actions).get(10**9) app.register_command('sync', sync_command) app()