Ticket #2205 (closed task: complete)
introduce a "data source configurator" thread in auth
|Reported by:||jinmei||Owned by:||jinmei|
|Sub-Project:||DNS||Feature Depending on Ticket:||background zone loading|
|Estimated Difficulty:||5||Add Hours to Ticket:||0|
Description (last modified by jinmei) (diff)
A subtask of #2201.
First, fully consider how to test these without creating threads.
In this task, we let auth spawn a separate thread with a
synchronization mechanism with the main auth thread. The main and
configurator thread work as the producer and the consumer: the main
thread (producer) passes general form of command in the form of
ConstElementPtr and the configurator thread (consumer) accepts each
command and execute it.
Choose an appropriate synchronization mechanism for the concept and
implement it. One way is to let both threads share
vector<ConstElementPtr> with a conditional variable to get access to
In this task, we only support "shutdown" command. On auth's shutdown,
the main thread sends this command to configurator, and waits for it
to die by join(). The configurator simply exits if it gets this
Same open question as in #2202 applies. We use the consistent policy
This ticket depends on #2332 if we use condition variables.
- Milestone changed from Next-Sprint-Proposed to Sprint-20120918
comment:13 Changed 7 months ago by jinmei
- Owner changed from jinmei to UnAssigned
- Status changed from accepted to reviewing