Add cancellable support for blocking commands