enhance robustness of scheduler
1. check all memory allocation failure in `taosInitScheduler`; 2. make `pSched->numOfThreads` the actual number of created threads to avoid crash in `taosCleanUpScheduler` when `pSched->qthread` is NULL and other issues; 3. check interruption of `sem_wait` in `taosScheduleTask`, and use `pTrace` instead of `pError` when `sem_wait` was interrupted; 4. cancel all threads before join them to enable cocurrent cancellation; 5. remove unused global variable.
Showing
想要评论请 注册 或 登录