Example #1
0
 /// <summary>
 /// Queues an action to run on a game resource, which will be run later by the game thread.
 /// </summary>
 /// <param name="action"></param>
 public void QueueResMod(ResAction action)
 {
     lock (ResActionQueue)
     {
         ResActionQueue.Enqueue(action);
     }
 }
Example #2
0
 public void BlockingResMod(ResAction action)
 {
     var wait = new AutoResetEvent(false);
     action.SetSignal(wait);
     lock (ResActionQueue)
     {
         ResActionQueue.Enqueue(action);
     }
     wait.WaitOne();
 }
Example #3
0
        public void BlockingResMod(ResAction action)
        {
            var wait = new AutoResetEvent(false);

            action.SetSignal(wait);
            lock (ResActionQueue)
            {
                ResActionQueue.Enqueue(action);
            }
            wait.WaitOne();
        }
Example #4
0
 /// <summary>
 /// Queues an action to run on a game resource, which will be run later by the game thread.
 /// </summary>
 /// <param name="action"></param>
 public void QueueResMod(ResAction action)
 {
     lock (ResActionQueue)
     {
         ResActionQueue.Enqueue(action);
     }
 }