Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Aug 2000 19:19:52 -0700 (PDT)
From:      John Polstra <jdp@polstra.com>
To:        hackers@freebsd.org
Subject:   Re: freebsd and non-preemtive threads
Message-ID:  <200008180219.TAA09529@vashon.polstra.com>
In-Reply-To: <Pine.BSF.4.21.0008171001210.43892-100000@resnet.uoregon.edu>
References:  <Pine.BSF.4.21.0008171001210.43892-100000@resnet.uoregon.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <Pine.BSF.4.21.0008171001210.43892-100000@resnet.uoregon.edu>,
Doug White  <dwhite@resnet.uoregon.edu> wrote:
> On Mon, 14 Aug 2000, Jonas Bulow wrote:
> 
> > I'm trying to build a preforked and threaded server. When it comes to
> > the threading part it seems that non-preemtive threads have a lot of
> > benefits if the server is a statefull-server. 
> > 
> > What I'm trying to say is that the server is not going to do a lot of
> > computation for each request. The server will simply update it's state
> > and respond about it's success. 
> 
> This reminds me of coroutines or userland select- or kqueue-based
> "threading."  Coroutines is a bit more complex but a library is available.  
> Select-based "threads" aren't too difficult to set up in C, you could use
> http://www.nightmare.com/medusa, a Python implementation, as a starting
> point.

Or use the very nice "eventlib" package from the ISC.  It is
released as a part of BIND, and you can find it in FreeBSD's
"src/contrib/bind/lib/isc" directory (along with some other stuff).

John
-- 
  John Polstra                                               jdp@polstra.com
  John D. Polstra & Co., Inc.                        Seattle, Washington USA
  "Disappointment is a good sign of basic intelligence."  -- Chögyam Trungpa



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200008180219.TAA09529>