code refactor

remove all lock, use channel instead
bugfix

fix gc