wait -> result + make reentrant