コード例 #1
0
 /// <summary>
 /// Konstruktor bezparametrowy - tworzy obiekt reprezentujący bezczynny wątek
 /// </summary>
 public ComputationalThread()
 {
     state = ComputationalThreadState.Idle;
     howLong = 0;
     problemInstanceId = taskId = null;
     problemType = null;
 }
コード例 #2
0
        /// <summary>
        /// Konstruktor obiektów ComputationalThread
        /// </summary>
        /// <param name="_state">Stan wątku</param>
        /// <param name="_howLong">Jak długo w tym stanie (w milisekundach)</param>
        /// <param name="_problemInstanceId">Id instanjci problemu</param>
        /// <param name="_taskId">Id taska</param>
        /// <param name="_problemType">Nazwa problemu</param>
        public ComputationalThread(ComputationalThreadState _state, UInt64 _howLong, UInt64? _problemInstanceId,
            UInt64? _taskId, String _problemType)
        {
            if (_state == ComputationalThreadState.Busy)
                if (_problemInstanceId == null || _taskId == null || _problemType == null)
                    throw new System.ArgumentException();

            state = _state;
            howLong = _howLong;
            problemInstanceId = _problemInstanceId;
            taskId = _taskId;
            problemType = _problemType;
        }