Inheritance: IDisposable
Esempio n. 1
0
 internal Coroutine(String Name, CoroutinePool Pool, Action Action)
 {
     this.Pool = Pool;
     IsAlive   = true;
     Thread    = new Thread(() =>
     {
         try
         {
             CoroutineContinueEvent_WaitOne();
             Action();
         }
         catch (InterruptException)
         {
         }
         catch (Exception Exception)
         {
             RethrowException = Exception;
         }
         finally
         {
             IsAlive = false;
             Pool.CallerContinueEvent.Set();
         }
     })
     {
         CurrentCulture = new CultureInfo("en-US"),
         IsBackground   = true,
     };
     this.Name      = Name;
     this.MustStart = true;
 }
Esempio n. 2
0
 internal Coroutine(string name, CoroutinePool pool, Action action)
 {
     Pool    = pool;
     IsAlive = true;
     Thread  = new Thread(() =>
     {
         Console.WriteLine("Coroutine.Start()");
         try
         {
             CoroutineContinueEvent_WaitOne();
             action();
         }
         catch (InterruptException)
         {
         }
         catch (Exception e)
         {
             _rethrowException = e;
         }
         finally
         {
             Console.WriteLine("Coroutine.End()");
             IsAlive = false;
             pool.CallerContinueEvent.Set();
         }
     })
     {
         CurrentCulture = new CultureInfo("en-US"),
         IsBackground   = true,
     };
     Name       = name;
     _mustStart = true;
 }
Esempio n. 3
0
		internal Coroutine(String Name, CoroutinePool Pool, Action Action)
		{
			this.Pool = Pool;
			IsAlive = true;
			Thread = new Thread(() =>
			{
				try
				{
					CoroutineContinueEvent_WaitOne();
					Action();
				}
				catch (InterruptException)
				{
				}
				catch (Exception Exception)
				{
					RethrowException = Exception;
				}
				finally
				{
					IsAlive = false;
					Pool.CallerContinueEvent.Set();
				}
			})
			{
				CurrentCulture = new CultureInfo("en-US"),
				IsBackground = true,
			};
			this.Name = Name;
			this.MustStart = true;
		}
Esempio n. 4
0
 public override void InitializeComponent()
 {
     this.PspConfig = PspEmulatorContext.PspConfig;
     if (this.PspConfig.UseCoRoutines)
     {
         this.CoroutinePool = new CoroutinePool();
     }
     else
     {
     }
     Reset();
 }
Esempio n. 5
0
 public override void InitializeComponent()
 {
     this.PspConfig = PspEmulatorContext.PspConfig;
     if (this.PspConfig.UseCoRoutines)
     {
         this.CoroutinePool = new CoroutinePool();
     }
     else
     {
     }
     NativeBreakpoints = new HashSet<uint>();
     RegisteredNativeSyscalls = new Dictionary<int, Action<CpuThreadState, int>>();
     IsRunning = true;
 }