Thanks, that is the information I was looking for (and an error source
I wouldn't have found quickly). Luckily I do have a central class for
caching Forms which makes implementing locking and preloading quite
easy.
Out curiousity: what parameters do uniquely define a Binding (the one
that is being locked)? Is it just the service, or is it service + name
or something else?
For example, my definitions for a module look like this:
Bind<INavigationForm>().To<AConcreteForm>().Named("ACertainState");
Bind<INavigationForm>().To<AnotherConcreteForm>().Named
("AnotherState");
Are concurrent calls to Kernel.Get<INavigationForm>("ACertainState")
and Kernel.Get<INavigationForm>("AnotherState") safe, or is this
exactly what you explained in your answer?
On 26 Nov., 15:21, Ian Davis <
ian.f.da...@gmail.com> wrote:
> The key is the lock on the binding. Requests that use the same binding will
> be threadsafe. But, you may have many bindings for a particular interface,
> in which case you would have to perform your own synchronization.
>
> On Thu, Nov 26, 2009 at 5:39 AM, TWischmeier
> <
tim.wischme...@googlemail.com>wrote:
> >
ninject+u...@googlegroups.com<
ninject%2Bunsu...@googlegroups.com>
> > .