Exemple #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);
        }
Exemple #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));
        }