Result of asynchronous operation will be saved to ThreadLocal, so no
problem with sharing between threads.

On Mon, Mar 23, 2015 at 1:47 PM, Vladimir Ozerov <[email protected]>
wrote:

> Hi,
>
> Consider the following scenario:
>
> IgniteCache cache = ignite.cache();
>
> IgniteCache cache1 = cache.withAsync();
> IgniteCache cache2 = cache1.withAsync();
>
> cache1.put(...);
>
> assert cache2.future() != null;
>
> It means that currently no async instance can be shared between threads
> safely.
>
> Shouldn't we create new instance every time "withAsync()" is called? Or
> current semantics was implemented intentionally?
>
> Vladimir.
>

Reply via email to