add maxThread config and implement execute task with async