/// <exception cref="System.Exception"/> public Void Call() { byte[] array = impl.NewByteArray(arrayLength); TestByteArrayManager.SleepMs(sleepTime); impl.Release(array); return(null); }
public override void Run() { TestByteArrayManager.Log.Info("randomRecycler start"); for (int i = 0; this.ShouldRun(); i++) { int j = DFSUtil.GetRandom().Next(runners.Length); try { runners[j].Recycle(); } catch (Exception e) { Sharpen.Runtime.PrintStackTrace(e); exceptions.AddItem(new Exception(this + " has an exception", e)); } if ((i & unchecked ((int)(0xFF))) == 0) { TestByteArrayManager.Log.Info("randomRecycler sleep, i=" + i); TestByteArrayManager.SleepMs(100); } } TestByteArrayManager.Log.Info("randomRecycler done"); }