Example #1
0
        /// <summary>
        /// Registers a new slave with the monitor.  Upon registration, a slave is marked as available for jobs.
        /// </summary>
        public virtual void RegisterSlave(IEvolutionState state, string name, TcpClient socket, BinaryWriter writer, BinaryReader reader)
        {
            var newSlave = new SlaveConnection(state, name, socket, writer, reader, this);

            lock (_availableSlaves.SyncRoot)
            {
                _availableSlaves.Insert(_availableSlaves.Count, newSlave);
                NotifyMonitor(_availableSlaves);
            }
            lock (_allSlaves.SyncRoot)
            {
                _allSlaves.Insert(_allSlaves.Count, newSlave);
                NotifyMonitor(_allSlaves);
            }
        }
Example #2
0
 private void InitBlock(SlaveConnection enclosingInstance)
 {
     Enclosing_Instance = enclosingInstance;
 }
Example #3
0
 public AnonymousClassThread1(SlaveConnection enclosingInstance)
 {
     InitBlock(enclosingInstance);
 }