From 03f727fcc57f597c610fd7454a31980efa5ea036 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Mon, 31 Jan 2000 15:12:41 +0000 Subject: [PATCH] Notes from Bob to bind-dev about tasks (shutdown and termination). This is the start of what I hope will grow to be more descriptive documentation of usage of the ISC task/event library. --- doc/design/tasks | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 doc/design/tasks diff --git a/doc/design/tasks b/doc/design/tasks new file mode 100644 index 0000000000..53d28e5522 --- /dev/null +++ b/doc/design/tasks @@ -0,0 +1,29 @@ +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