- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 192 for Once (0.02 sec)
-
internal/once/singleton.go
package once // Singleton contains a pointer to T that must be set once. // Until the value is set all Get() calls will block. type Singleton[T any] struct { v *T set chan struct{} } // NewSingleton creates a new unset singleton. func NewSingleton[T any]() *Singleton[T] { return &Singleton[T]{set: make(chan struct{}), v: nil} } // Get will return the singleton value. func (s *Singleton[T]) Get() *T { <-s.set return s.v
Registered: 2025-05-25 19:28 - Last Modified: 2024-08-15 12:04 - 952 bytes - Viewed (0) -
internal/cachevalue/cache.go
// The returned value can no longer be modified once returned. // Should be set before calling Get(). updateFn func(ctx context.Context) (T, error) // ttl for a cached value. ttl time.Duration opts Opts // Once can be used to initialize values for lazy initialization. // Should be set before calling Get(). Once sync.Once // Managed values. val atomic.Pointer[T]
Registered: 2025-05-25 19:28 - Last Modified: 2024-05-24 12:50 - 4.4K bytes - Viewed (0) -
internal/ioutil/wait_pipe.go
"sync" ) // PipeWriter is similar to io.PipeWriter with wait group type PipeWriter struct { *io.PipeWriter once sync.Once done func() } // CloseWithError close with supplied error the writer end. func (w *PipeWriter) CloseWithError(err error) error { err = w.PipeWriter.CloseWithError(err) w.once.Do(func() { w.done() }) return err } // PipeReader is similar to io.PipeReader with wait group
Registered: 2025-05-25 19:28 - Last Modified: 2023-04-27 14:55 - 1.7K bytes - Viewed (0) -
.teamcity/mvnw.cmd
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") @REM Execute a user defined script before this one if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre @REM check for pre script, once with legacy .bat ending and once with .cmd ending if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" :skipRcPre @setlocal set ERROR_CODE=0
Registered: 2025-05-28 11:36 - Last Modified: 2020-02-26 01:48 - 6.5K bytes - Viewed (0) -
docs/distributed/DECOMMISSION.md
``` ### Decommissioning status ``` λ mc admin decommission status alias/ http://minio{1...2}/data{1...4} Decommissioning rate at 36 MiB/sec [4 TiB/50 TiB] Started: 1 minute ago ``` Once it is **Complete** ``` λ mc admin decommission status alias/ http://minio{1...2}/data{1...4} Decommission of pool http://minio{1...2}/data{1...4} is complete, you may now remove it from server command line ```
Registered: 2025-05-25 19:28 - Last Modified: 2022-07-11 14:59 - 8.3K bytes - Viewed (0) -
architecture/build-state-model.md
### Build session state A "build session" represents a single invocation of Gradle, for example when you run `gradlew build`. A session runs the build one or more times. For example, when continuous build is enabled, the session may run the build many times, but when it is disabled, the session will run the build once only.
Registered: 2025-05-28 11:36 - Last Modified: 2024-05-22 13:39 - 3.4K bytes - Viewed (0) -
src/arena/arena.go
// Arenas are useful for improving efficiency as they may be freed back to // the runtime manually, though any memory obtained from freed arenas must // not be accessed once that happens. An Arena is automatically freed once // it is no longer referenced, so it must be kept alive (see runtime.KeepAlive) // until any memory allocated from it is no longer needed. //
Registered: 2025-05-27 11:13 - Last Modified: 2022-10-12 20:23 - 4.3K bytes - Viewed (0) -
internal/once/init.go
package once import ( "context" "sync" "sync/atomic" ) // Inspired from Golang sync.Once but it is only marked // initialized when the provided function returns nil. // Init represents the structure. type Init struct { done uint32 m sync.Mutex } // Do is similar to sync.Once.Do - makes one successful
Registered: 2025-05-25 19:28 - Last Modified: 2023-05-09 04:20 - 2.1K bytes - Viewed (0) -
docs/features/interceptors.md
call to `chain.proceed(request)` is a critical part of each interceptor’s implementation. This simple-looking method is where all the HTTP work happens, producing a response to satisfy the request. If `chain.proceed(request)` is being called more than once previous response bodies must be closed. Interceptors can be chained. Suppose you have both a compressing interceptor and a checksumming interceptor: you'll need to decide whether data is compressed and then checksummed, or checksummed and...
Registered: 2025-05-30 11:42 - Last Modified: 2022-02-06 02:19 - 8.1K bytes - Viewed (0) -
cmd/metrics-v3-bucket-replication.go
"Total number of bytes failed at least once to replicate in the last hour on a bucket", bucketL) bucketReplLastHrFailedCountMD = NewGaugeMD(bucketReplLastHrFailedCount, "Total number of objects which failed replication in the last hour on a bucket", bucketL) bucketReplLastMinFailedBytesMD = NewGaugeMD(bucketReplLastMinFailedBytes, "Total number of bytes failed at least once to replicate in the last full minute on a bucket",
Registered: 2025-05-25 19:28 - Last Modified: 2024-08-15 12:04 - 8.1K bytes - Viewed (0)