CFY-1222 extract events logic
CFY-1222 add basic local task processing thread pool