Menu

Close
  • 首页
Subscribe
Menu

单例

A 1-post collection

Page 1 of 1

原子性

单例 package main import ( "fmt" "math/rand" "sync" "time" ) type A struct { Item int } var a *A var l sync.RWMutex func GetGlobalA() *A { if a »

chainhelen on go, golang, go语言, 原子性, 单例 16 May 2019
Page 1 of 1
chainhelen blog © 2023
Proudly published with Ghost