Skip to content

Commit 2044a3e

Browse files
committed
refactor: renaming
1 parent ebbbbda commit 2044a3e

File tree

6 files changed

+265
-263
lines changed

6 files changed

+265
-263
lines changed

concurrentset.go

Lines changed: 0 additions & 129 deletions
This file was deleted.

example/main.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
set "github.com/kafkaphoenix/goset"
88
)
99

10-
func noConcurrentDemo() {
10+
func nonConcurrentDemo() {
1111
fmt.Println("///////////Non-concurrent set demo")
1212
// Create a new set
1313

@@ -50,9 +50,9 @@ func noConcurrentDemo() {
5050
}
5151

5252
func concurrentDemo() {
53-
fmt.Println("///////////Concurrent set demo")
54-
// Create a new concurrent set
55-
cs := set.NewConcurrentSet[int]()
53+
fmt.Println("///////////Concurrent safe set demo")
54+
// Create a new concurrent safe set
55+
cs := set.NewSafeSet[int]()
5656

5757
const numGoroutines = 5
5858

@@ -61,7 +61,7 @@ func concurrentDemo() {
6161
var wg sync.WaitGroup
6262

6363
// Start multiple goroutines to add and remove elements
64-
fmt.Println("Adding and removing elements in concurrent set...")
64+
fmt.Println("Adding and removing elements in concurrent safe set...")
6565
fmt.Printf("Number of goroutines: %d, Operations per goroutine: %d\n", numGoroutines, opsPerGoroutine)
6666
fmt.Println("Removing even numbers...")
6767
fmt.Println("Adding odd numbers...")
@@ -122,7 +122,7 @@ func setOperations() {
122122
}
123123

124124
func main() {
125-
noConcurrentDemo()
125+
nonConcurrentDemo()
126126
concurrentDemo()
127127
setOperations()
128128
}

noconcurrentset.go

Lines changed: 0 additions & 123 deletions
This file was deleted.

0 commit comments

Comments
 (0)