Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 404 for QThread (0.24 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. 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)
  4. 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)
  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. android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

        }
      }
    
      /** Wait for the given thread to reach the {@link State#TIMED_WAITING} thread state. */
      void awaitTimedWaiting(Thread thread) {
        while (true) {
          switch (thread.getState()) {
            case BLOCKED:
            case NEW:
            case RUNNABLE:
            case WAITING:
              Thread.yield();
              break;
            case TIMED_WAITING:
              return;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 28.2K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/CallablesTest.java

      public void testRenaming() throws Exception {
        String oldName = Thread.currentThread().getName();
        final Supplier<String> newName = Suppliers.ofInstance("MyCrazyThreadName");
        Callable<@Nullable Void> callable =
            new Callable<@Nullable Void>() {
              @Override
              public @Nullable Void call() throws Exception {
                assertEquals(Thread.currentThread().getName(), newName.get());
                return null;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/eventbus/Dispatcher.java

     * thread) the subscriber is actually called when an event is dispatched to it.
     *
     * @author Colin Decker
     */
    @ElementTypesAreNonnullByDefault
    abstract class Dispatcher {
    
      /**
       * Returns a dispatcher that queues events that are posted reentrantly on a thread that is already
       * dispatching an event, guaranteeing that all events posted on a single thread are dispatched to
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Dec 15 19:31:54 GMT 2023
    - 7.3K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/util/concurrent/InterruptibleTask.java

      public final void run() {
        /*
         * Set runner thread before checking isDone(). If we were to check isDone() first, the task
         * might be cancelled before we set the runner thread. That would make it impossible to
         * interrupt, yet it will still run, since interruptTask will leave the runner value null,
         * allowing the CAS below to succeed.
         */
        Thread currentThread = Thread.currentThread();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Sep 29 21:34:48 GMT 2023
    - 9.9K bytes
    - Viewed (0)
  10. 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)
Back to top