コード例 #1
0
 /// <summary>
 /// [Game thread] Sends the parameters to the AI thread.
 /// </summary>
 /// <param name="game_time">Current in-game time (in seconds)</param>
 public static void Send(float game_time)
 {
     Instance.CurrentGameTime = game_time;
     lock (ThreadQueue) { ThreadQueue.Enqueue(Instance); }
     ThreadSignal.Set(); // Waking up the Get() function
     Clear();            // Resetting the instance for next update
 }
コード例 #2
0
ファイル: AsyncLogger.cs プロジェクト: lr-antunes/Blocks
 protected internal override bool BeforeLog(LogEntry logEntry)
 {
     lock (LogQueue)
     {
         LogQueue.Add(new KeyValuePair <Logger, LogEntry>(this.Logger, logEntry));
     }
     ThreadSignal.Set();
     return(true);
 }