Re: [patch] some threading fixes, and handle no default printers



On Fri, 2004-08-13 at 16:56 -0400, Jody Goldberg wrote:
> On Fri, Aug 13, 2004 at 04:04:07PM -0400, Colin Walters wrote:
> > On Fri, 2004-08-13 at 15:18 -0400, Jody Goldberg wrote:
> > 
> > > Putting the threading checks in the gpaui code where there are no
> > > obvious threads is certainly simple, but seems out of place.  I'd
> > > rather they be down in the only threaded backend
> > >     libgnomeprint/libgnomeprint/modules/cups/gnome-print-cups.c
> > > which keeps knowledge of threads local.
> > 
> > But we don't want to depend on GTK+ in libgnomeprint, right?
> 
> I'm not convinced that the gpa code is threadsafe we need a mutex
> down there. 

I doubt any of it is safe at all, to make it threadsafe we'd probably
have to take an approach similar to GTK+, with just a big mutex around
the whole thing.  I wonder if there are really any programs out there
calling libgnomeprint from multiple threads.  

Now libgnomeprint is a client of libgnomecups, which uses threads, but
this should be safe.  It only invokes callbacks from the main thread,
similarly to gnome-vfs.

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]