Added blocking api per #405.