httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Robert S. Thau)
Subject Re: threads
Date Sat, 17 Aug 1996 16:44:19 GMT
  That is, the compatibility layer may as well be the rsthreads API.

As the author of RSthreads, I respectfully dissent.  RSthreads includes
some functionality which many threads packages and interfaces do not
support, and while some of that is stuff which Apache would require in
some form anyway (e.g., per-thread alarms), and might as well be part
of the compatibility layer for that reason, a lot of it isn't.

In particular, there's a nigh-on universal convention in RSthreads
that a timeout value may be specified for any operation that can block
a thread (e.g., wait until notify of a particular condition, or for
ten seconds, whichever comes first) which would be somewhat awkward to
support on top of other threads interfaces (pthreads in particular).

This sort of thing *does* have its uses --- for instance, the
RSthreads DNS-support code uses it internally to manage retransmits to
the nameserver, by waiting until DNS-dispatch has notified the waiting
thread that its response has arrived, *or* until a timeout has
elapsed.  However, I've deliberately tried to avoid it in the main
apache-XX server code, to avoid creating artificial barriers to ports
on top of other threads layers, and I don't think it should be in a
compatibility-layer interface for the same reason.


View raw message