How to wait for bpy.ops.wm.alembic_import to finish? Quite a simple question I hope, I've been tearing my hair out with it for over a day now though. I'm trying to write a background python script that will import an alembic and then perform certain actions on it.

I can get the alembic to import by calling bpy.ops.wm.alembic_import with the filepath, however this import appears to occur in a separate thread which means that the code I immediately move on to still sees an empty scene.

Is there a way to make the python script execution wait until the import is finished, or insert a callback that will be called once the import is finished? I've tried the load_post and scene_update_post callbacks with no luck.
bpy.ops.wm.alembic_import operator provides a property called as_background_job which defaults to True. In that case the alembic import will happen asynchronously.

You can override the default behavior by passing a False value, in which case the import happens synchronously (blocking Blender)

bpy.ops.wm.alembic_import(filepath='....abc', as_background_job=False)