Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.1
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
local /
go /
src /
sync /
[ HOME SHELL ]
Name
Size
Permission
Action
atomic
[ DIR ]
drwxr-xr-x
cond.go
2.54
KB
-rw-r--r--
cond_test.go
5.07
KB
-rw-r--r--
example_pool_test.go
1
KB
-rw-r--r--
example_test.go
1.14
KB
-rw-r--r--
export_test.go
1.27
KB
-rw-r--r--
map.go
11
KB
-rw-r--r--
map_bench_test.go
4.79
KB
-rw-r--r--
map_reference_test.go
3.39
KB
-rw-r--r--
map_test.go
3.45
KB
-rw-r--r--
mutex.go
7.32
KB
-rw-r--r--
mutex_test.go
5.7
KB
-rw-r--r--
once.go
2.25
KB
-rw-r--r--
once_test.go
1.1
KB
-rw-r--r--
pool.go
8.15
KB
-rw-r--r--
pool_test.go
7.25
KB
-rw-r--r--
poolqueue.go
8.87
KB
-rw-r--r--
runtime.go
2.17
KB
-rw-r--r--
runtime_sema_test.go
1.34
KB
-rw-r--r--
rwmutex.go
4.42
KB
-rw-r--r--
rwmutex_test.go
4.36
KB
-rw-r--r--
waitgroup.go
4.41
KB
-rw-r--r--
waitgroup_test.go
5.78
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : once_test.go
// Copyright 2009 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 sync_test import ( . "sync" "testing" ) type one int func (o *one) Increment() { *o++ } func run(t *testing.T, once *Once, o *one, c chan bool) { once.Do(func() { o.Increment() }) if v := *o; v != 1 { t.Errorf("once failed inside run: %d is not 1", v) } c <- true } func TestOnce(t *testing.T) { o := new(one) once := new(Once) c := make(chan bool) const N = 10 for i := 0; i < N; i++ { go run(t, once, o, c) } for i := 0; i < N; i++ { <-c } if *o != 1 { t.Errorf("once failed outside run: %d is not 1", *o) } } func TestOncePanic(t *testing.T) { var once Once func() { defer func() { if r := recover(); r == nil { t.Fatalf("Once.Do did not panic") } }() once.Do(func() { panic("failed") }) }() once.Do(func() { t.Fatalf("Once.Do called twice") }) } func BenchmarkOnce(b *testing.B) { var once Once f := func() {} b.RunParallel(func(pb *testing.PB) { for pb.Next() { once.Do(f) } }) }
Close