Asynchronous operation and krb5 dependencies

Simo Sorce simo at redhat.com
Mon Jun 6 16:09:22 EDT 2011


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




More information about the krbdev mailing list