implement Transport#waitFor for running function synchronous