- Send back user interrupted tasks to the head of the queue.
0.3.3
Added
- Keep event loop alive
Event loop could be dead if all tasks are keeping. The task keeps event loop to listen for events. Because it be woke up periodically.
0.3.2
Changed
- Handle `asyncio.CancelledError`
If capturing the `asyncio.CancelledError`, sending back the task to backend.
- Handle signal by following steps:
1. send back all running tasks 2. cancel all running tasks 3. stop the running loop 4. exit
0.3.1
Fixed
- Be compatible for Python3.8
0.3.0
Added
- Add type hints - Add `ChihuoLoop.task_finished` and `ChihuoLoop.task_exists` - Add `name` option for `loop.create_task` - Add log at end when `ChihuoLoop._run_forever` to be False
Changed
- Change `ChihuoLoop._run` to `ChihuoLoop._run_` - Release `semaphore` after `ChihuoLoop.stop` set to True - Change `ChihuoType` name as `TaskType`; Use `Enum` for `TaskType` - Handle INT and TERM signals as following steps:
1. Set `factory.stop` to True 2. Cancel all running tasks except the `TaskType.Final` and `TaskType.TaskLoop` tasks. 3. Cancel all `TaskType.TaskLoop` tasks except the `TaskType.Final` 4. Stop the loop