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