Implemented select() on sync demux