Sync waiting support in API