zoukankan      html  css  js  c++  java
  • SynchronizationScopeActivity

     

    1SynchronizationScopeActivity容器可设置一个互斥标记,有了互斥标记的SynchronizationScopeActivity容器相对另一个容器,是一个完整的执行单元,当一个容器没有完成时,其他有互斥标记的容器不会执行。

    2.这时,具有同一互斥标记的容器,执行模式已经与ParallelActivity中描述有所不同,此时他们是串行的,下例中的等待时间变为所有Delay的累加,顺序也成了:A1,A2,A3,B1,B2,C1,C2

    3.可以将多组分组字符加入SynchronizationHandles属性,具有相同分组字符的SynchronizationScopeActivity不会同时执行

    4.如果不设SynchronizationHandles属性,SynchronizationScopeActivity不起任何做用






     

    SynchronizationHandles属性

    System.Collections.Generic.List<string> stringcollection1 = new System.Collections.Generic.List<string>();

    System.Collections.Generic.List<string> stringcollection2 = new System.Collections.Generic.List<string>();

    System.Collections.Generic.List<string> stringcollection3 = new System.Collections.Generic.List<string>();

               

    stringcollection1.Add("wxwinter");

    this.syn3.SynchronizationHandles = stringcollection1;

     stringcollection2.Add("wxwinter");

    this.syn2.SynchronizationHandles = stringcollection2;

               

    stringcollection3.Add("wxwinter");

    this.syn1.SynchronizationHandles = stringcollection3;

    可以将多组分组字符加入SynchronizationHandles属性,具有相同分组字符的SynchronizationScopeActivity不会同时执行

  • 相关阅读:
    Code-EncryptDecrypt:DES
    Code-Helper:EncryptHelper.cs
    Code-Helper:EmailHelper.cs
    养生-影视:《长寿之道——长寿村里的百岁夫妻》
    影视-栏目:《致富经》
    影视-栏目:《远方的家》
    影视-纪录片:《长江行》
    影视-纪录片:《塔里木河》
    影视-纪录片:《天山脚下》
    Counting Lines, Words, and Characters with wc
  • 原文地址:https://www.cnblogs.com/foundation/p/525857.html
Copyright © 2011-2022 走看看