- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 803 for lock (0.03 sec)
-
internal/lock/lock_windows.go
} } return &LockedFile{File: f}, nil } // TryLockedOpenFile - tries a new write lock, functionality // it is similar to LockedOpenFile with with syscall.LOCK_EX // mode but along with syscall.LOCK_NB such that the function // doesn't wait forever but instead returns if it cannot // acquire a write lock. func TryLockedOpenFile(path string, flag int, perm os.FileMode) (*LockedFile, error) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Oct 18 18:08:15 UTC 2023 - 7.9K bytes - Viewed (0) -
misc/ios/go_ios_exec.go
// works, but only when running one binary at a time. // Use a file lock to make sure only one wrapper is running at a time. // // The lock file is never deleted, to avoid concurrent locks on distinct // files with the same path. lockName := filepath.Join(os.TempDir(), "go_ios_exec-"+deviceID+".lock") lock, err = os.OpenFile(lockName, os.O_CREATE|os.O_RDONLY, 0666) if err != nil { return 1, err }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Jun 18 16:32:49 UTC 2024 - 8.7K bytes - Viewed (0) -
internal/store/batch.go
func (b *Batch[I]) Add(item I) error { b.Lock() defer b.Unlock() if b.isFull() { if b.store == nil { return ErrBatchFull } // commit batch to store if err := b.commit(); err != nil { return err } } b.items = append(b.items, item) return nil } // Len returns the no of items in the batch func (b *Batch[_]) Len() int { b.Lock() defer b.Unlock() return len(b.items)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 2.9K bytes - Viewed (0) -
internal/lock/lock_nix.go
// // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. package lock import ( "os" "syscall" ) // Internal function implements support for both // blocking and non blocking lock type. func lockedOpenFile(path string, flag int, perm os.FileMode, lockType int) (*LockedFile, error) { switch flag { case syscall.O_RDONLY:
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 19 01:35:22 UTC 2021 - 2.8K bytes - Viewed (0) -
cmd/metacache-manager.go
func (m *metacacheManager) deleteBucketCache(bucket string) { m.init.Do(m.initManager) m.mu.Lock() b, ok := m.buckets[bucket] if !ok { m.mu.Unlock() return } delete(m.buckets, bucket) m.mu.Unlock() // Since deletes may take some time we try to do it without // holding lock to m all the time. b.mu.Lock() defer b.mu.Unlock() for k, v := range b.caches {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 25 00:44:15 UTC 2022 - 5.2K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/ForwardingLock.java
import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; /** Forwarding wrapper around a {@code Lock}. */ @J2ktIncompatible @ElementTypesAreNonnullByDefault abstract class ForwardingLock implements Lock { abstract Lock delegate(); @Override public void lock() { delegate().lock(); } @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Apr 04 09:45:04 UTC 2023 - 1.5K bytes - Viewed (0) -
internal/pubsub/pubsub.go
} ps.Lock() defer ps.Unlock() sub := &Sub[T]{ch: subCh, types: Mask(mask.Mask()), filter: filter} ps.subs = append(ps.subs, sub) // We hold a lock, so we are safe to update combined := Mask(atomic.LoadUint64(&ps.types)) combined.Merge(Mask(mask.Mask())) atomic.StoreUint64(&ps.types, uint64(combined)) go func() { <-doneCh ps.Lock() defer ps.Unlock()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Feb 06 16:57:30 UTC 2024 - 5.2K bytes - Viewed (0) -
compat/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultUpdateCheckManager.java
return; } FileChannel channel = null; FileLock lock = null; try { Properties props = new Properties(); channel = new RandomAccessFile(touchfile, "rw").getChannel(); lock = channel.lock(); if (touchfile.canRead()) {
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 12.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt
*/ class TaskRunner( val backend: Backend, internal val logger: Logger = TaskRunner.logger, ) { val lock: ReentrantLock = ReentrantLock() val condition: Condition = lock.newCondition() private var nextQueueName = 10000 private var coordinatorWaiting = false private var coordinatorWakeUpAt = 0L /**
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 29 00:33:04 UTC 2024 - 10.6K bytes - Viewed (0) -
internal/bucket/object/lock/lock_test.go
"x-amz-object-lock-mode": "governance", "x-amz-object-lock-retain-until-date": "2020-02-01", }, expected: map[string]string{}, filterRetention: true, filterLegalHold: true, }, { metadata: map[string]string{ "x-amz-object-lock-legal-hold": "on", "x-amz-object-lock-mode": "governance",
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Jun 29 01:20:27 UTC 2024 - 17.1K bytes - Viewed (0)