/// <summary> /// /// </summary> /// <param name="name"></param> /// <param name="runTest"></param> internal static void Start(string name, Action runTest) { #if DotNetStandard Console.WriteLine("WARN : Linux .NET Core not support name EventWaitHandle"); IsCreatedProcessWait = true; { #else EventWaitHandle processWait = new EventWaitHandle(false, EventResetMode.ManualReset, name, out IsCreatedProcessWait); if (IsCreatedProcessWait) { using (processWait) #endif { mapPointer = AutoCSer.Unmanaged.GetSize64((Count + 7) >> 3); try { addMap = new AutoCSer.MemoryMap(mapPointer.Byte); do { Left = AutoCSer.Random.Default.Next(); runTest(); }while (true); } finally { AutoCSer.Unmanaged.Free(ref mapPointer); } } } }
/// <summary> /// /// </summary> /// <param name="name"></param> /// <param name="runTest"></param> internal static void Start(string name, Action runTest) { using (EventWaitHandle processWait = new EventWaitHandle(false, EventResetMode.ManualReset, name, out IsCreatedProcessWait)) { mapPointer = AutoCSer.Unmanaged.GetSize64((Count + 7) >> 3); try { addMap = new AutoCSer.MemoryMap(mapPointer.Byte); do { Left = AutoCSer.Random.Default.Next(); runTest(); }while (true); } finally { AutoCSer.Unmanaged.Free(ref mapPointer); } } }