a golang-like channel implemented based on C++11