bind9/doc/design/tasks
Ondřej Surý 2bf7921c7e Update the copyright information in all files in the repository
This commit converts the license handling to adhere to the REUSE
specification.  It specifically:

1. Adds used licnses to LICENSES/ directory

2. Add "isc" template for adding the copyright boilerplate

3. Changes all source files to include copyright and SPDX license
   header, this includes all the C sources, documentation, zone files,
   configuration files.  There are notes in the doc/dev/copyrights file
   on how to add correct headers to the new files.

4. Handle the rest that can't be modified via .reuse/dep5 file.  The
   binary (or otherwise unmodifiable) files could have license places
   next to them in <foo>.license file, but this would lead to cluttered
   repository and most of the files handled in the .reuse/dep5 file are
   system test files.

(cherry picked from commit 58bd26b6cf)
2022-01-11 12:22:09 +01:00

79 lines
2.1 KiB
Text

<!--
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
SPDX-License-Identifier: MPL-2.0
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
-->
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 explicitly, 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
Notes from the task/event discussion led by Bob Halley on 13 March 2000:
A task is an event queue.
(task) --V
(event)-->(event)-->(event)
(runnable queue)--V
(task)-->(task)-->(task)
Normally only one task manager in an application.
Task becomes runnable if it has a non-empty event queue.
One or more worker threads run tasks.
Event routines should be relatively short.
Only one runnable queue that all workers share.
Events for a task are always posted serially. Multiple worker threads
will not be working on multiple events for one task at the same time.
isc_event_send, posting an event, can't fail. It just adds an event
to the task queue.
Event action (callback) rules:
* no locks held on your behald when entering a callback.
* not allowed to block, except when acquiring a lock.
* not allowed to hold a lock when exiting the callback.
TIMERS?
OMAPI -- need taskmgr to omapi_lib_init
-- one task per client connection