BIND 10 #2861: synchronization between auth main thread and datasrc builder

BIND 10 Development do-not-reply at isc.org
Fri Apr 12 07:45:24 UTC 2013


#2861: synchronization between auth main thread and datasrc builder
-------------------------------------+-------------------------------------
            Reporter:  jinmei        |                        Owner:
                Type:  task          |                       Status:  new
            Priority:  medium        |                    Milestone:
           Component:  b10-auth      |  Previous-Sprint-Proposed
            Keywords:                |                   Resolution:
           Sensitive:  0             |                 CVSS Scoring:
         Sub-Project:  DNS           |              Defect Severity:  N/A
Estimated Difficulty:  4             |  Feature Depending on Ticket:
         Total Hours:  0             |  shared memory data source
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------

Comment (by jinmei):

 Replying to [comment:4 vorner]:

 > > The issue of other synchronous communication such as a pipe is that
 > > how the main thread can check it; the main thread is normally sleeping
 > > in the ASIO event loop (unless it's a super busy server handling
 > > queries all the time), so we'll need something like an ASIO event
 > > posted by the other thread or timer based polling anyway.
 >
 > Uh? Do we talk about the same thing? Pipe is a file descriptor, I can
 put the reading end into ASIO and schedule a read event. So ASIO happily
 runs the main loop (waits in some poll-like thing, handling the queries
 that come out, the command FD, and the pipe).

 Okay, that makes sense.

 I created one relate ticket: #2916.

 For this task, the main thread would create a socketpair and
 `IOSocketLocal`, and pass the other FD to the builder thread.

 From the builder thread to the main thread, I suggest using a similar
 queue like command_queue, and we could use the same `Command` type:

 {{{#!cpp
 typedef std::pair<CommandID, data::ConstElementPtr> Command;
 }}}

-- 
Ticket URL: <http://bind10.isc.org/ticket/2861#comment:6>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list