[Yazlist] Threads versus Proceses
rondon.andrade at uol.com.br
Sat Oct 6 07:35:35 CEST 2001
Thank you very much for this update. I'm gonna install it and see how it
works. About the Unix system, I'm using OpenBSD 2.9.
Soon, I'll give you my feedback. ok.
----- Original Message -----
From: Adam Dickmeiss <adam at indexdata.dk>
To: Rondon Andrade <rondon.andrade at uol.com.br>
Cc: Jason MacDonald <jasonm at compusult.nf.ca>; <yazlist at indexdata.dk>
Sent: Friday, October 05, 2001 1:05 PM
Subject: Re: [Yazlist] Threads versus Proceses
> I've uploaded a version of YAZ that supports both POSIX threads and GNU
> threads. To enable GNU threads, AKA pth, use the following configure:
> ./configure --enable-pth <other options>
> Note that --enable-threads enables POSIX threads - not GNU threads
> (perhaps that option should be renamed to --enable-pthreads). I added a
> new option so that YAZ programmers can select which threads to use for
> systems that supports both.
> GNU threads were a little bit tricker to support than I thought initially.
> This is due to the fact that GNU threads are non-preemptive which means
> that it is up to the application to force a thread switch (like WIN16).
> For networked I/O that works, but it means that the applications on every
> blocking call should use a special form of call (say read or write)
> the one provided by the C library. The only place where the YAZ frontend
> server blocks is when it calls select(2), since all calls to read / write
> are non-blocking. So when I called the GNU thread wrapper of select
> (pth_select) it worked.
> This doesn't mean that your application works as well as you thought it
> would. In particular if your backend thread is not prepared to let other
> threads get CPU time, it means that the whole YAZ server will block as
> as your backend is busy.. In short, it operates as it would in static mode
> (option -S for the YAZ server). Read the man page for GNU threads
> carefully - man pth on my GNU Debian system.
> BTW: what UNIX system are you using? Most systems these days support
> POSIX threads.
> We haven't updated Zebra to support this yet.
> On Wed, Oct 03, 2001 at 06:42:51PM -0300, Rondon Andrade wrote:
> > Thank you!! Adam.
> > We're gonna be waiting for your feedback ok.
> > Thanks in advance.
> > Rondon.
> > Ps.: As I'm using also Zebra, would it be incorporated inside the
> > ----- Original Message -----
> > From: "Adam Dickmeiss" <adam at indexdata.dk>
> > To: "Jason MacDonald" <jasonm at compusult.nf.ca>
> > Cc: "Rondon Andrade" <rondon.andrade at uol.com.br>; <yazlist at indexdata.dk>
> > Sent: Wednesday, October 03, 2001 2:14 PM
> > Subject: Re: [Yazlist] Threads versus Proceses
> > > On Wed, Oct 03, 2001 at 10:39:13AM -0230, Jason MacDonald wrote:
> > > > Hi,
> > > > I have downloaded and compiled the pthreads library from GNU as
> > > > mentioned and then I linked the library (libpth.a) into my program
> > > > still get the same message "Threaded mode not available". I compiled
> > > > using ./configure --enable-threads
> > >
> > > YAZ supports POSIX - not GNU threads. Some systems may support both
> > > threads and POSIX threads, however. We'll be happy to add support for
> > > GNU threads. I expect it to be easy to make - especially when reading
> > > this on http://www.gnu.org/software/pth/ :
> Adam Dickmeiss mailto:adam at indexdata.dk http://www.indexdata.dk
> Index Data T: +45 33410100 Mob.: 212 212 66
More information about the Yazlist