Exemple #1
0
        public static FastCRC32 GetCRC32Instance(ulong window)
        {
            if (_crc32 == null)
            {
                lock (_syncCRC32)
                {
                    if (initializing)
                        _mre.WaitOne();

                    initializing = true;

                    if (_crc32 == null)
                    {
                        _crc32 = new FastCRC32(window);
                    }
                }
            }

            return _crc32;
        }
Exemple #2
0
        public static FastCRC32 GetCRC32Instance(ulong window)
        {
            if (_crc32 == null)
            {
                lock (_syncCRC32)
                {
                    if (initializing)
                    {
                        _mre.WaitOne();
                    }

                    initializing = true;

                    if (_crc32 == null)
                    {
                        _crc32 = new FastCRC32(window);
                    }
                }
            }

            return(_crc32);
        }