[16856] in Kerberos_V5_Development
Re: Asynchronous operation and krb5 dependencies
daemon@ATHENA.MIT.EDU (Simo Sorce)
Mon Jun 6 16:09:33 2011
From: Simo Sorce <simo@redhat.com>
To: Nathaniel McCallum <npmccallum@redhat.com>
In-Reply-To: <1307389357.2174.7.camel@localhost>
Date: Mon, 06 Jun 2011 16:09:22 -0400
Message-ID: <1307390962.2613.161.camel@willson.li.ssimo.org>
Mime-Version: 1.0
Cc: Nico Williams <nico@cryptonector.com>, "krbdev@mit.edu" <krbdev@mit.edu>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: krbdev-bounces@mit.edu
On Mon, 2011-06-06 at 15:42 -0400, Nathaniel McCallum wrote:
> On Mon, 2011-06-06 at 10:48 -0400, Simo Sorce wrote:
> > On Mon, 2011-06-06 at 10:17 -0400, Greg Hudson wrote:
> > > On Mon, 2011-06-06 at 06:46 -0400, Nico Williams wrote:
> > > > (Well, but then, how do you deal with APIs like the GSS-API where
> > > > there's no obvious way to reference any particular context due to the
> > > > lack of a krb5_context-like argument?)
> > >
> > > For the purposes of libkrb5, we're taking the view that an application
> > > will only need one main loop implementation. (It may need multiple
> > > instances of the main loop, but we're not trying to support an
> > > application which uses libevent in one thread and g_main_* in another.)
> > > So, when the application provides its vtable to libverto, that will get
> > > stored in global process state and used for all async operations--no
> > > need for a context.
> >
> > I would strongly advice for passing a context, you can pass it down
> > easily, and should you decide to not use it later, you can simply set it
> > to NULL, or ignore the argument. But adding a new interface w/o a
> > context is calling for trouble later IMHO.
>
> There is another extremely important reason to pass a context: you can't
> assume that you can use the default loop.
Or you may not *want* to :)
Simo.
--
Simo Sorce * Red Hat, Inc * New York
_______________________________________________
krbdev mailing list krbdev@mit.edu
https://mailman.mit.edu/mailman/listinfo/krbdev