コード例 #1
0
		public static void RemoveService (dLightWeightProcessBase _Process)
		{
			if (m_Processes != null) {
				if (m_Processes.Remove (_Process)) {
					_Process.internal_DecrementRegister ();
					Command command = new Command (eCommandType.UnRegister, _Process);
					ThreadProcess.EnqueueCommand (command);
					command.Event.WaitOne ();
				}
			}
		}
コード例 #2
0
			public Command (eCommandType _Command, dLightWeightProcessBase _Service)
			{
				m_Command = _Command;
				m_Service = _Service;
				m_Event = new ManualResetEvent (false);
			}
コード例 #3
0
		public static void AddService (dLightWeightProcessBase _Process)
		{
			if (m_Processes != null) {
				if (_Process != null) {
					m_Processes.Add (_Process);
					_Process.internal_IncrementRegister ();
					Command command = new Command (eCommandType.Register, _Process);
					ThreadProcess.EnqueueCommand (command);
					command.Event.WaitOne ();
				}
			} else {
				throw new Exception ("dLightWeightProcessThread has not been initialised, please initialise it through the Foundation Initialisation System.");
			}
		}
コード例 #4
0
		public static void AsyncRemoveService (dLightWeightProcessBase _Process)
		{
			if (m_Processes != null) {
				if (m_Processes.Remove (_Process)) {
					_Process.internal_DecrementRegister ();
					ThreadProcess.EnqueueCommand (new Command (eCommandType.UnRegister, _Process));
				}
			}
		}
コード例 #5
0
			private void RemoveServiceFromList (dLightWeightProcessBase _process)
			{
				_process.internal_UnRegister ();
			}
コード例 #6
0
			private void AddServiceToList (dLightWeightProcessBase _process)
			{
				_process.internal_Register (EnqueueProcessToBeUpdated);
			}
コード例 #7
0
			public static void EnqueueProcessToBeUpdated (dLightWeightProcessBase _process)
			{
				if (Active) {
					if (_process.PendingProcessCount == 0 && _process.RegestrationCount > 0) {
						Command command = new Command (eCommandType.process, _process);
						m_InternalCommandQueue.Enqueue (command);
						m_InternalCommandQueueEvent.Release ();
					}
				}
			}