- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 852 for sync (0.03 sec)
-
schema/pool.go
package schema import ( "reflect" "sync" ) // sync pools var ( normalPool sync.Map poolInitializer = func(reflectType reflect.Type) FieldNewValuePool { v, _ := normalPool.LoadOrStore(reflectType, &sync.Pool{ New: func() interface{} { return reflect.New(reflectType).Interface() }, }) return v.(FieldNewValuePool) }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Apr 11 13:37:44 UTC 2022 - 345 bytes - Viewed (0) -
src/archive/zip/register.go
type Decompressor func(r io.Reader) io.ReadCloser var flateWriterPool sync.Pool func newFlateWriter(w io.Writer) io.WriteCloser { fw, ok := flateWriterPool.Get().(*flate.Writer) if ok { fw.Reset(w) } else { fw, _ = flate.NewWriter(w, 5) } return &pooledFlateWriter{fw: fw} } type pooledFlateWriter struct { mu sync.Mutex // guards Close and Write fw *flate.Writer }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Oct 13 18:36:46 UTC 2023 - 3.7K bytes - Viewed (0) -
cmd/untar.go
r = bf default: return fmt.Errorf("Unsupported format %s", f) } tarReader := tar.NewReader(r) n := 0 asyncWriters := make(chan struct{}, 16) var wg sync.WaitGroup var asyncErr error var asyncErrMu sync.Mutex for { if !o.ignoreErrs { asyncErrMu.Lock() err := asyncErr asyncErrMu.Unlock() if err != nil { return err } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 22 00:33:43 UTC 2024 - 6K bytes - Viewed (2) -
internal/dsync/dsync-server_test.go
// along with this program. If not, see <http://www.gnu.org/licenses/>. package dsync import ( "fmt" "io" "net/http" "net/http/httptest" "sync" "sync/atomic" "time" "github.com/minio/mux" ) const numberOfNodes = 5 var ( ds *Dsync nodes = make([]*httptest.Server, numberOfNodes) // list of node IP addrs or hostname with ports.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jan 23 16:46:37 UTC 2023 - 8.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 // call to the function. ie, it invokes the function
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue May 09 04:20:31 UTC 2023 - 2.1K bytes - Viewed (0) -
internal/config/lambda/target/lazyinit.go
// along with this program. If not, see <http://www.gnu.org/licenses/>. package target import ( "sync" "sync/atomic" ) // Inspired from Golang sync.Once but it is only marked // initialized when the provided function returns nil. type lazyInit struct { done uint32 m sync.Mutex } func (l *lazyInit) Do(f func() error) error { if atomic.LoadUint32(&l.done) == 0 { return l.doSlow(f)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Mar 07 16:12:41 UTC 2023 - 1.3K bytes - Viewed (0) -
internal/event/targetlist.go
func (list *TargetList) Send(event Event, targetIDset TargetIDSet, sync bool) { if sync { list.sendSync(event, targetIDset) } else { list.sendAsync(event, targetIDset) } } func (list *TargetList) sendSync(event Event, targetIDset TargetIDSet) { var wg sync.WaitGroup for id := range targetIDset { target, ok := list.get(id) if !ok { continue }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 9.2K bytes - Viewed (0) -
cmd/metrics-v3-cluster-iam.go
syncFailuresMD = NewCounterMD(syncFailures, "Number of failed IAM data syncs since server start.") syncSuccessesMD = NewCounterMD(syncSuccesses, "Number of successful IAM data syncs since server start.") ) // loadClusterIAMMetrics - `MetricsLoaderFn` for cluster IAM metrics.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu May 02 08:20:42 UTC 2024 - 4.5K bytes - Viewed (0) -
callbacks/create_test.go
package callbacks import ( "reflect" "sync" "testing" "time" "gorm.io/gorm" "gorm.io/gorm/clause" "gorm.io/gorm/schema" ) var schemaCache = &sync.Map{} func TestConvertToCreateValues_DestType_Slice(t *testing.T) { type user struct { ID int `gorm:"primaryKey"` Name string Email string `gorm:"default:(-)"` Age int `gorm:"default:(-)"` }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Mar 18 05:48:42 UTC 2024 - 1.4K bytes - Viewed (0) -
internal/ioutil/wait_pipe.go
// along with this program. If not, see <http://www.gnu.org/licenses/>. package ioutil import ( "io" "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 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Apr 27 14:55:36 UTC 2023 - 1.7K bytes - Viewed (0)