mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-23 10:39:16 +00:00
30 lines
766 B
Plaintext
30 lines
766 B
Plaintext
|
Changes I made last week to the task code simplified the task shutdown
|
||
|
and termination model. Here's how things now work:
|
||
|
|
||
|
When a task is shutdown:
|
||
|
|
||
|
Any "on shutdown" events for the task are posted
|
||
|
|
||
|
The "shutting down" attribute of the task is set
|
||
|
|
||
|
Any attempts to add shutdown events with isc_task_onshutdown()
|
||
|
will fail, since the task is already shutting down
|
||
|
|
||
|
Task shutdown can be initiated explicity, via a call to isc_task_shutdown(),
|
||
|
or implicitly, when the following conditions occur:
|
||
|
|
||
|
The "shutting down" attribute of the task is not set
|
||
|
|
||
|
The task has no references
|
||
|
|
||
|
The task has an empty event queue
|
||
|
|
||
|
|
||
|
Task termination occurs when:
|
||
|
|
||
|
The "shutting down" attribute of the task is set
|
||
|
|
||
|
The task has no references
|
||
|
|
||
|
The task has an empty event queue
|