File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed
Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -104,17 +104,15 @@ void* worker_sc(void *arg)
104104
105105#define join_threads \
106106for (i = 0; i < nthreads; i++)\
107- pthread_join(threads[i], NULL);\
108- printf("current size= %d\n", (int) lfqueue_size(myq) )
107+ pthread_join(threads[i], NULL)
109108
110109#define detach_thread_and_loop \
111110for (i = 0; i < nthreads; i++)\
112111pthread_detach(threads[i]);\
113112while ( nthreads_exited < nthreads ) \
114113 lfqueue_sleep(10);\
115114if(lfqueue_size(myq) != 0){\
116- lfqueue_sleep(10);\
117- printf("current size= %zu\n", lfqueue_size(myq) );\
115+ lfqueue_sleep(10);
118116}
119117
120118void multi_enq_deq (pthread_t * threads ) {
Original file line number Diff line number Diff line change @@ -40,8 +40,7 @@ unsigned __stdcall worker(void *arg)
4040
4141#define join_threads \
4242for (i = 0; i < nthreads; i++)\
43- WaitForSingleObject(threads[i], INFINITE);\
44- printf("current size= %d\n", (int) lfqueue_size(&myq) )
43+ WaitForSingleObject(threads[i], INFINITE)
4544/*
4645#define detach_thread_and_loop \
4746for (i = 0; i < nthreads; i++)\
You can’t perform that action at this time.
0 commit comments