public virtual void Collect(int doc)
            {
                int docId = doc + docBase;

                if (slowdown > 0)
                {
                    //try
                    //{
                    ThreadClass.Sleep(slowdown);
//                    }
//#if NETSTANDARD1_5
//                    catch (Exception)
//                    {
//                        throw;
//                    }
//#else
//                    catch (ThreadInterruptedException) // LUCENENET NOTE: Senseless to catch and rethrow the same exception type
//                    {
//                        throw;
//                    }
//#endif
                }
                Debug.Assert(docId >= 0, " base=" + docBase + " doc=" + doc);
                bits.Set(docId);
                lastDocCollected = docId;
            }
Пример #2
0
            public virtual void Collect(int doc)
            {
                int docId = doc + docBase;

                if (slowdown > 0)
                {
                    try
                    {
                        ThreadClass.Sleep(slowdown);
                    }
#if NETSTANDARD
                    catch (Exception)
                    {
                        throw;
                    }
#else
#pragma warning disable 168
                    catch (ThreadInterruptedException ie)
#pragma warning restore 168
                    {
                        throw;
                    }
#endif
                }
                Debug.Assert(docId >= 0, " base=" + docBase + " doc=" + doc);
                bits.Set(docId);
                lastDocCollected = docId;
            }
Пример #3
0
            public override void Collect(int doc)
            {
                int docId = doc + docBase;

                if (slowdown > 0)
                {
                    try
                    {
                        ThreadClass.Sleep(slowdown);
                    }
                    catch (ThreadInterruptedException ie)
                    {
                        throw;
                    }
                }
                Debug.Assert(docId >= 0, " base=" + docBase + " doc=" + doc);
                bits.Set(docId);
                lastDocCollected = docId;
            }