mirror of
https://github.com/minio/minio.git
synced 2026-02-04 18:00:15 -05:00
simplify usage of mutexes and atomic constants (#9501)
This commit is contained in:
@@ -42,7 +42,7 @@ const (
|
||||
)
|
||||
|
||||
// Global object layer mutex, used for safely updating object layer.
|
||||
var globalObjLayerMutex *sync.RWMutex
|
||||
var globalObjLayerMutex sync.RWMutex
|
||||
|
||||
// Global object layer, only accessed by globalObjectAPI.
|
||||
var globalObjectAPI ObjectLayer
|
||||
@@ -50,11 +50,6 @@ var globalObjectAPI ObjectLayer
|
||||
//Global cacheObjects, only accessed by newCacheObjectsFn().
|
||||
var globalCacheObjectAPI CacheObjectLayer
|
||||
|
||||
func init() {
|
||||
// Initialize this once per server initialization.
|
||||
globalObjLayerMutex = &sync.RWMutex{}
|
||||
}
|
||||
|
||||
// Checks if the object is a directory, this logic uses
|
||||
// if size == 0 and object ends with SlashSeparator then
|
||||
// returns true.
|
||||
|
||||
Reference in New Issue
Block a user