[JDEV] Why not GLib ?
Benjamin Kahn
xkahn at cybersites.com
Sat Oct 14 00:10:40 CDT 2000
glib does not _provide_ threading. However, it exports a common
thread interface for Windows threads, pthreads, and Solaris threads. You
use the glib abstraction routines, and it will work on any platform.
There was even recent discussion of adding pth to that list. (The list
was full of people making fun of pth for a while.) The URL is here:
http://developer.gnome.org/doc/API/glib/glib-threads.html
The reason why glib is often mentioned as a replacement for pth,
and not straight pthreads is because pth also offers some routines like
message ports which isn't part of pthreads. (I believe.)
And, I hate to say it, but glib could really help clean up the
jabber server. It can add portability, nice data types, etc.
On Fri, 13 Oct 2000, Dave Smith wrote:
> GLib does _not_ provide threading capabilities. :) Additionally, we'll
> be moving to pthreads for 1.3...
>
> D.
>
> On Fri, Oct 13, 2000 at 03:24:41PM -0400, Benjamin Kahn wrote:
> >
> > What dependancy would that be? And, if Jabber used glib, you
> > could get rid of the REALLY TERRIBLE pth...
> >
> > On Fri, 13 Oct 2000, Dave Smith wrote:
> >
> > > Date: Fri, 13 Oct 2000 13:04:04 -0600
> > > From: Dave Smith <dave at jabber.org>
> > > Reply-To: jdev at jabber.org
> > > To: jdev at jabber.org
> > > Subject: Re: [JDEV] Why not GLib ?
> > >
> > > Well..glib has come up a number of times when we need data structures. The
> > > primary reason that we haven't used it is that the added dependency that
> > > GLib would bring outweighs the actual functionality that we would actually
> > > use from it. :)
> > >
> > > Jabber isn't all that complicated and we like to keep the codebase as small
> > > and dependent-free as possible.
> > >
> > > D.
> > >
> > > On Fri, Oct 13, 2000 at 06:57:50PM +0200, David Le Corfec wrote:
> > > > Why not use the GLib for jabber2 ?
> > > >
> > > > It has nice abstract types for lists, hashes ...
> > > > (see libjabber/src/genhash.c)
> > > > Plus nice portability/utility functions, and
> > > > handy macros (g_return_if_fail() kind of macros
> > > > can save life by ensuring preconditions and writing
> > > > a nice log message if it fails, instead of silently
> > > > returning)
> > > >
> > > > http://developer.gnome.org/doc/API/glib/index.html
> > > >
> > > > If there's no strong reason against it, it could
> > > > be progressively used in libxode/libjabber/jabber2 ...
> > > > (I would like to cleanup most of the code in a GLib
> > > > fashion :)
> > > >
> > > > Or at least some ideas could be reused (like
> > > > those preconditions checks ...)
> > > >
> > > > It also is a good example of programming,
> > > > take a look at the sources :)
> > > >
> > > > --
> > > > David Le Corfec
> > > > Disclaimer : I love the GLib :)
> > > >
> > > > _______________________________________________
> > > > jdev mailing list
> > > > jdev at jabber.org
> > > > http://mailman.jabber.org/listinfo/jdev
> > > >
> > >
> > > _______________________________________________
> > > jdev mailing list
> > > jdev at jabber.org
> > > http://mailman.jabber.org/listinfo/jdev
> > >
> >
> > -Ben
> >
> > ------------------------------------ |\ _,,,--,,_ ,) ----------
> > Benjamin Kahn /,`.-'`' -, ;-;;'
> > (212) 924 - 2220 ext 201 |,4- ) )-,_ ) /\
> > ben at cybersites.com --------------- '---''(_/--' (_/-' ---------------
> > I just want to make the world a better place for me to live in.
> > -Lucy in a Peanuts comic
> >
> >
> > _______________________________________________
> > jdev mailing list
> > jdev at jabber.org
> > http://mailman.jabber.org/listinfo/jdev
> >
>
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
>
-Ben
------------------------------------ |\ _,,,--,,_ ,) ----------
Benjamin Kahn /,`.-'`' -, ;-;;'
(212) 924 - 2220 ext 201 |,4- ) )-,_ ) /\
ben at cybersites.com --------------- '---''(_/--' (_/-' ---------------
I just want to make the world a better place for me to live in.
-Lucy in a Peanuts comic
More information about the JDev
mailing list