Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 21 - 30 of 92 for go_routine (0.05 seconds)

  1. docs/ru/docs/async.md

    Часто всю функциональность использования асинхронного кода с `async` и `await` кратко называют «сопрограммами». Это сопоставимо с ключевой особенностью Go — «goroutines».
    
    ## Заключение { #conclusion }
    
    Вернёмся к той же фразе:
    
    > Современные версии Python поддерживают **«асинхронный код»** с помощью **«сопрограмм»** (coroutines) и синтаксиса **`async` и `await`**.
    
    Теперь это должно звучать понятнее. ✨
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Tue Sep 30 11:24:39 GMT 2025
    - 38.5K bytes
    - Click Count (0)
  2. cmd/namespace-lock_test.go

    		// lk2
    		lk2ch := make(chan struct{})
    		go func() {
    			defer close(lk2ch)
    			nsLk.lock(ctx, "volume", "path", "source", "opsID", false, 1*time.Millisecond)
    		}()
    		time.Sleep(1 * time.Millisecond) // wait for goroutine to advance; ref=2
    
    		// Unlock the 1st lock; ref=1 after this line
    		nsLk.unlock("volume", "path", false)
    
    		// Taking another lockMapMutex here allows queuing up additional lockers. This should
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Fri Aug 29 02:39:48 GMT 2025
    - 3K bytes
    - Click Count (0)
  3. internal/store/batch.go

    		return err
    	default:
    	}
    	if _, err := b.store.PutMultiple(b.items); err != nil {
    		return err
    	}
    	b.items = make([]I, 0, b.limit)
    	return nil
    }
    
    // Close commits the pending items and quits the goroutines
    func (b *Batch[I]) Close() error {
    	defer func() {
    		close(b.quitCh)
    	}()
    
    	b.Lock()
    	defer b.Unlock()
    	return b.commit()
    }
    
    // NewBatch creates a new batch
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Fri Sep 06 23:06:30 GMT 2024
    - 2.9K bytes
    - Click Count (0)
  4. cmd/notification.go

    // returns the slice of errors from all function calls.
    func (g *NotificationGroup) Wait() []NotificationPeerErr {
    	g.workers.Wait()
    	return g.errs
    }
    
    // Go calls the given function in a new goroutine.
    //
    // The first call to return a non-nil error will be
    // collected in errs slice and returned by Wait().
    func (g *NotificationGroup) Go(ctx context.Context, f func() error, index int, addr xnet.Host) {
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Sun Sep 28 20:59:21 GMT 2025
    - 46K bytes
    - Click Count (0)
  5. docs/fr/docs/async.md

    Mais toutes ces fonctionnalités d'utilisation de code asynchrone avec `async` et `await` sont souvent résumées comme l'utilisation des *coroutines*. On peut comparer cela à la principale fonctionnalité clé de Go, les "Goroutines".
    
    ## Conclusion
    
    Reprenons la phrase du début de la page :
    
    > Les versions modernes de Python supportent le **code asynchrone** grâce aux **"coroutines"** avec les syntaxes **`async` et `await`**.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sun Aug 31 09:56:21 GMT 2025
    - 25.4K bytes
    - Click Count (0)
  6. internal/rest/client.go

    		sleep := min(unit*time.Duration(1<<attempt), maxSleep)
    		sleep -= time.Duration(r.Float64() * float64(sleep-unit))
    		return sleep
    	}
    }
    
    func (c *Client) runHealthCheck() bool {
    	// Start goroutine that will attempt to reconnect.
    	// If server is already trying to reconnect this will have no effect.
    	if c.HealthCheckFn != nil && atomic.CompareAndSwapInt32(&c.connected, online, offline) {
    		go func() {
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Sun Sep 28 20:59:21 GMT 2025
    - 14.7K bytes
    - Click Count (0)
  7. internal/ringbuffer/ring_buffer.go

    )
    
    // RingBuffer is a circular buffer that implement io.ReaderWriter interface.
    // It operates like a buffered pipe, where data written to a RingBuffer
    // and can be read back from another goroutine.
    // It is safe to concurrently read and write RingBuffer.
    type RingBuffer struct {
    	buf       []byte
    	size      int
    	r         int // next position to read
    	w         int // next position to write
    	isFull    bool
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Sun Sep 28 20:59:21 GMT 2025
    - 13.3K bytes
    - Click Count (0)
  8. internal/dsync/drwmutex_test.go

    	}
    	// Wait for all parallel RLock()s to succeed.
    	for range numReaders {
    		<-clocked
    	}
    	for range numReaders {
    		cunlock <- true
    	}
    	// Wait for the goroutines to finish.
    	for range numReaders {
    		<-cdone
    	}
    }
    
    // Borrowed from rwmutex_test.go
    func TestParallelReaders(t *testing.T) {
    	defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(-1))
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Sun Sep 28 20:59:21 GMT 2025
    - 9.4K bytes
    - Click Count (0)
  9. src/arena/arena.go

    // it is no longer referenced, so it must be kept alive (see runtime.KeepAlive)
    // until any memory allocated from it is no longer needed.
    //
    // An Arena must never be used concurrently by multiple goroutines.
    type Arena struct {
    	a unsafe.Pointer
    }
    
    // NewArena allocates a new arena.
    func NewArena() *Arena {
    	return &Arena{a: runtime_arena_newArena()}
    }
    
    Created: Tue Dec 30 11:13:12 GMT 2025
    - Last Modified: Wed Oct 12 20:23:36 GMT 2022
    - 4.3K bytes
    - Click Count (0)
  10. cmd/admin-handlers_test.go

    	}
    
    	result := &serviceResult{}
    	if err := json.Unmarshal(resp, result); err != nil {
    		t.Error(err)
    	}
    	_ = result
    
    	// Wait until testServiceSignalReceiver() called in a goroutine quits.
    	wg.Wait()
    }
    
    // Test for service restart management REST API.
    func TestServiceRestartHandler(t *testing.T) {
    	testServicesCmdHandler(restartCmd, t)
    }
    
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Fri Aug 29 02:39:48 GMT 2025
    - 13.9K bytes
    - Click Count (1)
Back to Top