[JDEV] Server Platforms

Benjamin Kahn xkahn at cybersites.com
Mon Jun 12 17:08:56 CDT 2000

On Mon, 12 Jun 2000, Eric Bowersox wrote:

> > 	1) Although cross-platformness is a great goal, pth 
> > doesn't really
> > accomplish this.  (As your post shows.)
> It's good at being cross-platform between UNIX-alikes...and, since it's
> FSF-owned code, I don't know how eager they are for it to be used on NT :-)

	An argument could be made that most platforms HAVE thread
libraries already.  And it could be said that POSIX threads are fairly
standard, and it could be said that wrapper libraries can be created for
platforms where POSIX threads are not available, or not the best
choice.  In fact, these wrappers have been written for a number of other
open source projects.  

> > 	2) Pth takes over SIGUSR1 which is normally (?) used as 
> > a "reload
> > configuration files" signal.
> It's usually SIGHUP that's used for reloading configuration files...however,
> SIGUSR1 frequently has other "interesting" uses that, yes, pth would
> preclude.

	Good point.  I confused the signals.

> > 	3) Pth doesn't play nice when it gets near other threading
> > systems.  This means that Jabber can not be linked with some
> > libraries.  This limits the usefulness of Jabber in some cases.  (ODBC
> > libraries are often linked with thread libraries.)
> Actually, pth provides a pthreads-compatible call interface, it looks like,
> so this might not be the issue you think it is.  However, I can't say for
> sure.

	I looked this over.  The man page is interesting...   (7000+
lines!)  It looks like PORTING an application from pthreads to pth might
be an easy enough thing to do.  (Kind of.  It's hard to tell how well it
works without trying it.)  However, this doesn't help if you are dealing
with a library which you don't have the source to.  And some libraries you
might not want to convert, and others ...  well, I admit it helps, but
it's not a really GOOD solution.

> > 	4) Pth isn't used by a lot of other projects, so it might have
> > hard to track down bugs.
> A few of which we've already seen :-).
> > 	It has only one nice thing:
> > 	Pth is cooperative threading.  Cooperative means that most race
> > conditions don't come up.  Switching to a non-cooperative thread model
> > would be a lot of work as races get stamped out.
> True...you don't need things like mutexes as much in pth, although they're
> provided.

	Don't mind me.  I'm just upset because I'm trying to link in a
commonly threaded library into Jabber.  I'll get over it.


------------------------------------ |\      _,,,--,,_  ,) ----------
Benjamin Kahn                        /,`.-'`'   -,  ;-;;'
(212) 924 - 2220 ext 201            |,4-  ) )-,_ ) /\
ben at cybersites.com --------------- '---''(_/--' (_/-' ---------------
	Q: Why does it crash?
	A: Woah! You should have seen it last week! 

More information about the JDev mailing list