Ignore:
Timestamp:
Feb 13, 2008 3:17:28 PM (17 years ago)
Author:
bennylp
Message:

Ticket #474: option in ioqueue to control concurrency (to allow/disallow simultaneous/multiple callback calls)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pjlib-test/ioq_unreg.c

    r1405 r1789  
    287287} 
    288288 
    289 int udp_ioqueue_unreg_test(void) 
     289static int udp_ioqueue_unreg_test_imp(pj_bool_t allow_concur) 
    290290{ 
    291291    enum { LOOP = 10 }; 
     
    294294    pj_ioqueue_t *ioqueue; 
    295295    pj_pool_t *test_pool; 
    296                                
     296         
     297    PJ_LOG(3,(THIS_FILE, "..testing with concurency=%d", allow_concur)); 
     298 
    297299    test_method = UNREGISTER_IN_APP; 
    298300 
     
    305307    } 
    306308 
     309    rc = pj_ioqueue_set_default_concurrency(ioqueue, allow_concur); 
     310    if (rc != PJ_SUCCESS) { 
     311        app_perror("Error in pj_ioqueue_set_default_concurrency()", rc); 
     312        return -12; 
     313    } 
    307314 
    308315    PJ_LOG(3, (THIS_FILE, "...ioqueue unregister stress test 0/3 (%s)",  
     
    352359} 
    353360 
    354  
     361int udp_ioqueue_unreg_test(void) 
     362{ 
     363    int rc; 
     364 
     365    rc = udp_ioqueue_unreg_test_imp(PJ_TRUE); 
     366    if (rc != 0) 
     367        return rc; 
     368 
     369    rc = udp_ioqueue_unreg_test_imp(PJ_FALSE); 
     370    if (rc != 0) 
     371        return rc; 
     372 
     373    return 0; 
     374} 
    355375 
    356376#else 
Note: See TracChangeset for help on using the changeset viewer.