Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.
/ syncslice Public archive

Goroutine-safe wrapper interface over a generic slice.

Notifications You must be signed in to change notification settings

nbd-wtf/syncslice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

syncslice

Goroutine-safe wrapper interface over a generic slice using sync.RWMutex.

You don't need this library. Slices are already safe. See #1 and https://go.dev/blog/slices-intro.

s := syncslice.Make[string](2, 3)

s.Set(0, "hello")
s.Set(1, "world")
s.Append("!")

for item := range s.Iter() {
    fmt.Println(item.Value)
}

About

Goroutine-safe wrapper interface over a generic slice.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages