- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for NewWrapperWithLock (0.13 sec)
-
test/typeparam/issue48337a.dir/main.go
// Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import "./a" func main() { obj := a.NewWrapperWithLock("this file does import sync") obj.PrintWithLock()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 24 02:14:15 UTC 2022 - 284 bytes - Viewed (0) -
test/typeparam/issue48337a.dir/a.go
// license that can be found in the LICENSE file. package a import ( "fmt" "sync" ) type WrapperWithLock[T any] interface { PrintWithLock() } func NewWrapperWithLock[T any](value T) WrapperWithLock[T] { return &wrapperWithLock[T]{ Object: value, } } type wrapperWithLock[T any] struct { Lock sync.Mutex Object T }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 17 19:50:04 UTC 2021 - 551 bytes - Viewed (0)