getting rid of threads

martin f krafft madduck at debian.org
Wed Jan 16 22:38:32 UTC 2008


I had an enlightening discussion on #debian-devel today with Mark
Brown and Peter De Schrijver. The gist: netconf should not be
polling flags like it polls threading.Event objects, or else the CPU
would never be able to spin down and the batteries would drain.

As a consequence I am going to be rewriting the netconf core. This
sounds like a big deal, and I am sure it's much work, but in the end
I can already see further simplification of the design: netconf will
become single-threaded, and the main loop will do nothing more than
select() over a list of file descriptors and call upon specific
handlers to process the data. It seems that this will also make the
event queue obsolete, as the main loop will basically be processing
events on the file descriptors as they come in, just like it would
happen with a queue.

So yeah, it is somewhat of a big deal, but it seems to me that I can
reuse most of the components and logic I've work on over the past
two weeks.

I'll keep you posted. If you have any comments, let's hear them!

-- 
 .''`.   martin f. krafft <madduck at debian.org>
: :'  :  proud Debian developer, author, administrator, and user
`. `'`   http://people.debian.org/~madduck - http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems
 
"once ... in the wilds of afghanistan, i lost my corkscrew, and we
 were forced to live on nothing but food and water for days."
                                -- w. c. fields, "my little chickadee"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature (see http://martin-krafft.net/gpg/)
Url : http://lists.alioth.debian.org/pipermail/netconf-devel/attachments/20080116/25867dbc/attachment.pgp 


More information about the netconf-devel mailing list