An open API service indexing awesome lists of open source software.

https://github.com/seeadoog/routine-local

a ThreadLocal implimetion for go
https://github.com/seeadoog/routine-local

Last synced: 3 months ago
JSON representation

a ThreadLocal implimetion for go

Awesome Lists containing this project

README

        

#### install

```text
go get github.com/skyniu/routine-local
```

#### usage

````text
func main() {
for i := 0; i < 100; i++ {
go func(i int) {
Set("key",i)
defer RemoveAll()
fmt.Println("get current routine value:",Get("key"))

}(i)
}
time.Sleep(1 * time.Second)

}
````