Changeset 1780


Ignore:
Timestamp:
Aug 8, 2010, 9:41:53 PM (11 years ago)
Author:
kopal
Message:

now no 2 connections between the same connectors are possible

Location:
trunk/CrypPlugins/WorkspaceManager
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/WorkspaceManager/Execution/ExecutionEngine.cs

    r1777 r1780  
    7777                this.workspaceModel = workspaceModel;
    7878                int amountSchedulers = System.Environment.ProcessorCount * 2;
    79  
     79                
    8080                //Here we create n = "ProcessorsCount * 2" Gears4Net schedulers
    8181                //We do this, because measurements showed that we get the best performance if we
     
    302302    /// </summary>
    303303    public class PluginProtocol : ProtocolBase
    304     {
    305        
     304    {       
    306305        public PluginModel PluginModel;
    307306        private ExecutionEngine executionEngine;
     
    399398           
    400399            msg.PluginModel.Plugin.Execute();
    401            
     400
    402401            if (this.executionEngine.BenchmarkPlugins)
    403402            {
     
    491490                            break;
    492491                    }
    493                     protocol = this.waitingProtocols.Dequeue();                                           
     492
     493                    protocol = this.waitingProtocols.Dequeue();
    494494                    ProtocolStatus status = protocol.Run();
    495495
     
    512512                        }
    513513                    }
     514                   
    514515                }
    515516            }
  • trunk/CrypPlugins/WorkspaceManager/Model/ConnectorModel.cs

    r1777 r1780  
    282282    public class Data
    283283    {
    284         public volatile Object value;
     284        public volatile object value;
    285285    }
    286286
  • trunk/CrypPlugins/WorkspaceManager/Model/WorkspaceModel.cs

    r1769 r1780  
    284284        /// They are compatible if their types are equal or the base type of the Connector
    285285        /// is equal to the type of the other Connector
     286        /// It is false if already exists a ConnectionModel between both given ConnectorModels
    286287        /// </summary>
    287288        /// <param name="connectorModelA"></param>
     
    293294            {
    294295                return false;
     296            }
     297
     298            foreach(ConnectionModel connectionModel in connectorModelA.WorkspaceModel.AllConnectionModels)
     299            {
     300                if ((connectionModel.From == connectorModelA && connectionModel.To == connectorModelB) ||
     301                   (connectionModel.From == connectorModelB && connectionModel.To == connectorModelA))
     302                {
     303                    return false;
     304                }
    295305            }
    296306               
Note: See TracChangeset for help on using the changeset viewer.