Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 730 for Phread (0.18 sec)

  1. src/cmd/cgo/internal/test/cthread_unix.c

    	for(i=0; i<nthread; i++)
    		pthread_join(thread_id[i], 0);		
    }
    
    static void*
    goDummyCallbackThread(void* p)
    {
    	int i, max;
    
    	max = *(int*)p;
    	for(i=0; i<max; i++)
    		goDummy();
    	return NULL;
    }
    
    int
    callGoInCThread(int max)
    {
    	pthread_t thread;
    
    	if (pthread_create(&thread, NULL, goDummyCallbackThread, (void*)(&max)) != 0)
    		return -1;
    C
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed May 17 21:53:11 GMT 2023
    - 1K bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/test/cthread_windows.c

    	return 0;
    }
    
    void
    doAdd(int max, int nthread)
    {
    	enum { MaxThread = 20 };
    	int i;
    	uintptr_t thread_id[MaxThread];
    	
    	if(nthread > MaxThread)
    		nthread = MaxThread;
    	for(i=0; i<nthread; i++)
    		thread_id[i] = _beginthreadex(0, 0, addThread, &max, 0, 0);
    	for(i=0; i<nthread; i++) {
    		WaitForSingleObject((HANDLE)thread_id[i], INFINITE);
    		CloseHandle((HANDLE)thread_id[i]);
    	}
    }
    
    __stdcall
    C
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed May 17 21:53:11 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/ThreadFactoryBuilderTest.java

                thread.setUncaughtExceptionHandler(UNCAUGHT_EXCEPTION_HANDLER);
                return thread;
              }
            };
    
        Thread thread =
            builder.setThreadFactory(backingThreadFactory).build().newThread(monitoredRunnable);
    
        assertEquals(THREAD_NAME, thread.getName());
        assertEquals(THREAD_PRIORITY, thread.getPriority());
        assertEquals(THREAD_DAEMON, thread.isDaemon());
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java

              @Override
              public void run() {
                list.execute();
              }
            };
        Thread thread1 = new Thread(execute);
        Thread thread2 = new Thread(execute);
        thread1.start();
        thread2.start();
        assertEquals(0, runCalled.get());
        okayToRun.countDown();
        thread1.join();
        thread2.join();
        assertEquals(1, runCalled.get());
      }
    
      public void testAddAfterRun() throws Exception {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 4.7K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java

              @Override
              public void run() {
                list.execute();
              }
            };
        Thread thread1 = new Thread(execute);
        Thread thread2 = new Thread(execute);
        thread1.start();
        thread2.start();
        assertEquals(0, runCalled.get());
        okayToRun.countDown();
        thread1.join();
        thread2.join();
        assertEquals(1, runCalled.get());
      }
    
      public void testAddAfterRun() throws Exception {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 4.7K bytes
    - Viewed (0)
  6. src/cmd/cgo/internal/test/cgo_thread_lock.go

    			select {
    			case <-stop:
    				return
    			case <-time.After(time.Millisecond * 100):
    			}
    		}
    	}()
    	defer close(stop)
    
    	for i := 0; i < 1000; i++ {
    		if !C.Ctid() {
    			t.Fatalf("cgo has not locked OS thread")
    		}
    	}
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu May 18 16:55:07 GMT 2023
    - 939 bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/ThreadFactoryBuilderTest.java

                thread.setUncaughtExceptionHandler(UNCAUGHT_EXCEPTION_HANDLER);
                return thread;
              }
            };
    
        Thread thread =
            builder.setThreadFactory(backingThreadFactory).build().newThread(monitoredRunnable);
    
        assertEquals(THREAD_NAME, thread.getName());
        assertEquals(THREAD_PRIORITY, thread.getPriority());
        assertEquals(THREAD_DAEMON, thread.isDaemon());
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/AggregateFutureState.java

         *
         * Our solution is for threads to CAS seenExceptions from null to a Set populated with _the
         * initial exception_, no matter which thread does the work. This ensures that seenExceptions
         * always contains not just the current thread's exception but also the initial thread's.
         */
        Set<Throwable> seenExceptionsLocal = seenExceptions;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Dec 14 20:35:03 GMT 2023
    - 8.5K bytes
    - Viewed (0)
  9. src/cmd/cgo/internal/test/issue1435.go

    //   int i;
    //   nts = argc;
    //   t = calloc(nts, sizeof(pthread_t));
    //   pthread_mutex_init(&mu, NULL);
    //   for (i = 0; i < nts; i++) {
    //     pthread_create(&t[i], NULL, aFn, NULL);
    //   }
    // }
    //
    // void cleanup(void) {
    //   int i;
    //   pthread_mutex_lock(&mu);
    //   all_done = 1;
    //   pthread_mutex_unlock(&mu);
    //   for (i = 0; i < nts; i++) {
    //     pthread_join(t[i], NULL);
    //   }
    //   pthread_mutex_destroy(&mu);
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Jul 28 21:31:41 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java

     * example involving two locks and two threads, deadlock occurs when one thread acquires Lock A, and
     * then Lock B, while another thread acquires Lock B, and then Lock A:
     *
     * <pre>
     * Thread1: acquire(LockA) --X acquire(LockB)
     * Thread2: acquire(LockB) --X acquire(LockA)
     * </pre>
     *
     * <p>Neither thread will progress because each is waiting for the other. In more complex
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Dec 15 19:31:54 GMT 2023
    - 35.9K bytes
    - Viewed (0)
Back to top