Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 730 for Thread (0.2 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. guava/src/com/google/common/base/internal/Finalizer.java

            logger.log(
                Level.INFO, "Failed to create a thread without inherited thread-local values", t);
          }
        }
        if (thread == null) {
          thread = new Thread((ThreadGroup) null, finalizer, threadName);
        }
        thread.setDaemon(true);
    
        try {
          if (inheritableThreadLocals != null) {
            inheritableThreadLocals.set(thread, null);
          }
        } catch (Throwable t) {
          logger.log(
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Wed Aug 23 12:54:09 GMT 2023
    - 9.4K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/base/SuppliersTest.java

        for (int i = 0; i < numThreads; i++) {
          threads[i] =
              new Thread() {
                @Override
                public void run() {
                  assertSame(Boolean.TRUE, memoizedSupplier.get());
                }
              };
        }
        for (Thread t : threads) {
          t.start();
        }
        for (Thread t : threads) {
          t.join();
        }
    
        if (thrown.get() != null) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 18.1K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/base/SuppliersTest.java

        for (int i = 0; i < numThreads; i++) {
          threads[i] =
              new Thread() {
                @Override
                public void run() {
                  assertSame(Boolean.TRUE, memoizedSupplier.get());
                }
              };
        }
        for (Thread t : threads) {
          t.start();
        }
        for (Thread t : threads) {
          t.join();
        }
    
        if (thrown.get() != null) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 18.1K bytes
    - Viewed (0)
  8. 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)
  9. guava-tests/test/com/google/common/util/concurrent/TestThread.java

        start();
      }
    
      // Thread.stop() is okay because all threads started by a test are dying at the end of the test,
      // so there is no object state put at risk by stopping the threads abruptly. In some cases a test
      // may put a thread into an uninterruptible operation intentionally, so there is no other way to
      // clean up these threads.
      @SuppressWarnings("deprecation")
      @Override
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/CallablesTest.java

              public @Nullable Void call() throws Exception {
                assertEquals(Thread.currentThread().getName(), newName.get());
                return null;
              }
            };
        Callables.threadRenaming(callable, newName).call();
        assertEquals(oldName, Thread.currentThread().getName());
      }
    
      @J2ktIncompatible
      @GwtIncompatible // threads
      public void testRenaming_exceptionalReturn() throws Exception {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 5.4K bytes
    - Viewed (0)
Back to top