add more checks
make the mutex type used by channel configurable