Implement inter-thread communication through channels
Use channels to represent event queue