zoukankan      html  css  js  c++  java
  • 其他函数-web_concurrent

    web_concurrent_start函数是并发组开始的标记。组中所有的函数是并发执行的,并发组的结束符为web_concurrent_end 函数。

    在并发组中,可以包含的函数有:

    web_url、web_submit_data、web_custom_request、web_create_html_param、web_create_html_param_ex、web_reg_save_param、web_add_header。 

    在并发组中的函数不是立即执行的。在并发组开始时,所有的函数首先被记录下来,当并发组结束时,所有的函数并发执行。正因为这样,我们使用的时候要注意,不是所有的函数或代码都可以放到并发组内的,比如lr_output_message函数的调试输出,如果放到并发组内,你将会得到错误的输出(有不少新手都碰到这样的问题,所以有必要在这提出)

      web_concurrent_start(NULL);
    
        web_url("getWidgetList.do",
            "URL=http://172.17.2.33:8090/dashboard/getWidgetList.do",
            "Resource=1",
            "RecContentType=application/json",
            "Referer=http://172.17.2.33:8090/starter.html",
            "Snapshot=t254.inf",
            LAST);
    
        web_reg_save_param("deleteID",
            "LB={"id":",
            "RB=,"userId"",
            "Ord=All",
            "NotFound=ERROR",
            LAST);
        web_reg_save_param("subjectID",
            "LB="subjectId":"",
            "RB=",",
            "Ord=All",
            "NotFound=ERROR",
            LAST);
        web_reg_save_param("responseBody",
            "LB=",
            "RB=",
            "NotFound=ERROR",
            LAST);
        web_url("getBoardListNoDelFlag.do",
            "URL=http://172.17.2.33:8090/dashboard/getBoardListNoDelFlag.do",
            "Resource=1",
            "RecContentType=application/json",
            "Referer=http://172.17.2.33:8090/starter.html",
            "Snapshot=t255.inf",
            LAST);
        
        web_url("getWidgetList.do_2",
            "URL=http://172.17.2.33:8090/dashboard/getWidgetList.do",
            "Resource=1",
            "RecContentType=application/json",
            "Referer=http://172.17.2.33:8090/starter.html",
            "Snapshot=t256.inf",
            LAST);
    
        
    
        web_concurrent_end(NULL);
        lr_output_message("deleteID: %s", lr_eval_string("{deleteID_count}"));
        lr_output_message("subjectID: %s", lr_paramarr_idx("subjectID",1));
        lr_output_message("responseBody: %s", lr_eval_string("{responseBody}"));
  • 相关阅读:
    2016第5周四
    2016第5周三
    2016第5周二
    HTTP2.0那些事
    2016第4周日
    【C语言的日常实践(十二)】命令行参数
    Oracle改变字段类型
    Codeforces Round #269 (Div. 2)
    linux shell 命令
    Codeforces Round #256 (Div. 2) C. Painting Fence 或搜索DP
  • 原文地址:https://www.cnblogs.com/lvchengda/p/12626108.html
Copyright © 2011-2022 走看看