Removed debugging printouts and inappropriate assertions.
authorZdeněk Šustr <sustr4@cesnet.cz>
Thu, 5 Oct 2006 15:13:38 +0000 (15:13 +0000)
committerZdeněk Šustr <sustr4@cesnet.cz>
Thu, 5 Oct 2006 15:13:38 +0000 (15:13 +0000)
org.glite.lb.client/examples/user_jobs_threaded.c
org.glite.lb.client/src/connection.c

index 65b2841..ccb6d3f 100644 (file)
@@ -102,18 +102,16 @@ err:
 
        edg_wll_FreeContext(ctx);
 
-        printf("Thread %d exitting\n",(int)pthread_self());
+//        printf("Thread %d exitting\n",(int)pthread_self());
 
         pthread_exit(NULL);
 
-        printf("Thread %d out !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n",(int)pthread_self());
-//        return 0;
 }
 
 int main(int argc,char **argv)
 {
 
-        #define NUM_THREADS 10
+        #define NUM_THREADS 60
 
         thread_code_args arguments = { NULL , 0 , NULL };
        int     i,rc,status;
@@ -161,9 +159,9 @@ int main(int argc,char **argv)
         pthread_attr_destroy(&attr);
 
         for (i=0;i<NUM_THREADS;i++) {
-            printf("*** Joining thread %d.\n",i);
+//            printf("*** Joining thread %d.\n",i);
             rc=pthread_join(threads[i],(void **)&status);
-            printf("*** Thread %d joined. (status %d ret. code %d)\n",i,status,rc);
+//            printf("*** Thread %d joined. (status %d ret. code %d)\n",i,status,rc);
 
         }
 
index 620eaa4..90b1459 100644 (file)
@@ -28,7 +28,7 @@ static void CloseConnection(edg_wll_Context ctx, int* conn_index)
         cIndex = *conn_index;
 
        assert(ctx->connections->connOpened);
-       assert(cIndex < ctx->connections->connOpened);
+//     assert(cIndex < ctx->connections->connOpened); // Assertion no longer valid. "Holes" in the pool are permitted.
 
        edg_wll_gss_close(&ctx->connections->connPool[cIndex].gss, &ctx->p_tmp_timeout);
        if (ctx->connections->connPool[cIndex].gsiCred) 
@@ -423,7 +423,7 @@ int edg_wll_http_send_recv(
        assert(connToUse >= 0);
        gettimeofday(&ctx->connections->connPool[connToUse].lastUsed, NULL);
  
-        sleep(3); //Just for testing
+//        sleep(3); //Just for testing
 
         edg_wll_connectionUnlock(ctx, connToUse);
        return 0;