tasks revision 03f727fcc57f597c610fd7454a31980efa5ea036
03f727fcc57f597c610fd7454a31980efa5ea036David LawrenceChanges I made last week to the task code simplified the task shutdown
03f727fcc57f597c610fd7454a31980efa5ea036David Lawrenceand termination model. Here's how things now work:
03f727fcc57f597c610fd7454a31980efa5ea036David Lawrence
03f727fcc57f597c610fd7454a31980efa5ea036David LawrenceWhen a task is shutdown:
03f727fcc57f597c610fd7454a31980efa5ea036David Lawrence
03f727fcc57f597c610fd7454a31980efa5ea036David Lawrence Any "on shutdown" events for the task are posted
03f727fcc57f597c610fd7454a31980efa5ea036David Lawrence
03f727fcc57f597c610fd7454a31980efa5ea036David Lawrence The "shutting down" attribute of the task is set
03f727fcc57f597c610fd7454a31980efa5ea036David Lawrence
03f727fcc57f597c610fd7454a31980efa5ea036David Lawrence Any attempts to add shutdown events with isc_task_onshutdown()
03f727fcc57f597c610fd7454a31980efa5ea036David Lawrence will fail, since the task is already shutting down
03f727fcc57f597c610fd7454a31980efa5ea036David Lawrence
03f727fcc57f597c610fd7454a31980efa5ea036David LawrenceTask shutdown can be initiated explicity, via a call to isc_task_shutdown(),
03f727fcc57f597c610fd7454a31980efa5ea036David Lawrenceor implicitly, when the following conditions occur:
03f727fcc57f597c610fd7454a31980efa5ea036David Lawrence
03f727fcc57f597c610fd7454a31980efa5ea036David Lawrence The "shutting down" attribute of the task is not set
03f727fcc57f597c610fd7454a31980efa5ea036David Lawrence
03f727fcc57f597c610fd7454a31980efa5ea036David Lawrence The task has no references
03f727fcc57f597c610fd7454a31980efa5ea036David Lawrence
03f727fcc57f597c610fd7454a31980efa5ea036David Lawrence The task has an empty event queue
03f727fcc57f597c610fd7454a31980efa5ea036David Lawrence
03f727fcc57f597c610fd7454a31980efa5ea036David Lawrence
03f727fcc57f597c610fd7454a31980efa5ea036David LawrenceTask termination occurs when:
03f727fcc57f597c610fd7454a31980efa5ea036David Lawrence
03f727fcc57f597c610fd7454a31980efa5ea036David Lawrence The "shutting down" attribute of the task is set
03f727fcc57f597c610fd7454a31980efa5ea036David Lawrence
03f727fcc57f597c610fd7454a31980efa5ea036David Lawrence The task has no references
03f727fcc57f597c610fd7454a31980efa5ea036David Lawrence
03f727fcc57f597c610fd7454a31980efa5ea036David Lawrence The task has an empty event queue