Exemplo n.º 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);
     }
 }
Exemplo n.º 2
0
 public void BlockingResMod(ResAction action)
 {
     var wait = new AutoResetEvent(false);
     action.SetSignal(wait);
     lock (ResActionQueue)
     {
         ResActionQueue.Enqueue(action);
     }
     wait.WaitOne();
 }
Exemplo n.º 3
0
        public void BlockingResMod(ResAction action)
        {
            var wait = new AutoResetEvent(false);

            action.SetSignal(wait);
            lock (ResActionQueue)
            {
                ResActionQueue.Enqueue(action);
            }
            wait.WaitOne();
        }
Exemplo n.º 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);
     }
 }