Пример #1
0
        public int WaitThread(HleThread HleThread, WakeUpCallbackDelegate WakeUpCallback, int ExpectedMinimumCount)
        {
            WaitingSemaphoreThreadList.Add(
                new WaitingSemaphoreThread()
                {
                    HleThread = HleThread,
                    ExpectedMinimumCount = ExpectedMinimumCount,
                    WakeUpCallback = WakeUpCallback,
                }
            );

            return UpdatedCurrentCount();
        }
Пример #2
0
        public int WaitThread(HleThread HleThread, WakeUpCallbackDelegate WakeUpCallback, int ExpectedMinimumCount)
        {
            WaitingSemaphoreThreadList.Add(
                new WaitingSemaphoreThread()
            {
                HleThread            = HleThread,
                ExpectedMinimumCount = ExpectedMinimumCount,
                WakeUpCallback       = WakeUpCallback,
            }
                );

            return(UpdatedCurrentCount());
        }
Пример #3
0
			public void Receive(PspPointer* PointerToMessage, WakeUpCallbackDelegate WakeUpCallback)
			{
				lock (this)
				{
					Action Extract = () =>
					{
						*PointerToMessage = Messages.Last.Value;
						Messages.RemoveLast();
						if (WakeUpCallback != null) WakeUpCallback();
					};
					ExtractQueue.Enqueue(Extract);
					CheckQueue();
				}
			}