Esempio n. 1
0
        private long CacheStoreCreate(long memPtr)
        {
            var cacheStore = CacheStore.CreateInstance(memPtr, _handleRegistry);

            if (_ignite != null)
            {
                cacheStore.Init(_ignite);
            }
            else
            {
                lock (_initActions)
                {
                    if (_ignite != null)
                    {
                        cacheStore.Init(_ignite);
                    }
                    else
                    {
                        _initActions.Add(cacheStore.Init);
                    }
                }
            }

            return(cacheStore.Handle);
        }
Esempio n. 2
0
        private long CacheStoreCreate(void *target, long memPtr)
        {
            return(SafeCall(() =>
            {
                var cacheStore = CacheStore.CreateInstance(memPtr, _handleRegistry);

                if (_ignite != null)
                {
                    cacheStore.Init(_ignite);
                }
                else
                {
                    lock (_initActions)
                    {
                        if (_ignite != null)
                        {
                            cacheStore.Init(_ignite);
                        }
                        else
                        {
                            _initActions.Add(cacheStore.Init);
                        }
                    }
                }

                return cacheStore.Handle;
            }, true));
        }