Split event dipsatch function from event poll; Do not use selfpipe barriers anymore.