New functions for locking a channel - these simplify debugging