make resolve_stubs support parallel effects