mirror of
https://github.com/ManyakRus/crud_generator.git
synced 2024-12-22 00:36:41 +02:00
сделал mutex_GetVersionModel
This commit is contained in:
parent
6ec1421434
commit
dc7df48dd7
@ -27,9 +27,10 @@ var mutex_GetVersionModel = sync.Mutex{}
|
||||
|
||||
// GetVersionModel - возвращает хэш версии структуры модели
|
||||
func (crud Crud_GRPC) GetVersionModel() uint32 {
|
||||
if VersionModel == 0 {
|
||||
mutex_GetVersionModel.Lock()
|
||||
defer mutex_GetVersionModel.Unlock()
|
||||
|
||||
if VersionModel == 0 {
|
||||
VersionModel = lawsuit_status_types.LawsuitStatusType{}.GetStructVersion()
|
||||
}
|
||||
return VersionModel
|
||||
|
@ -25,9 +25,10 @@ var mutex_GetVersionModel = sync.Mutex{}
|
||||
|
||||
// GetVersionModel - возвращает хэш версии структуры модели
|
||||
func (crud Crud_NRPC) GetVersionModel() uint32 {
|
||||
if VersionModel == 0 {
|
||||
mutex_GetVersionModel.Lock()
|
||||
defer mutex_GetVersionModel.Unlock()
|
||||
|
||||
if VersionModel == 0 {
|
||||
VersionModel = lawsuit_status_types.LawsuitStatusType{}.GetStructVersion()
|
||||
}
|
||||
return VersionModel
|
||||
|
Loading…
Reference in New Issue
Block a user