Wieder mit Mutex

This commit is contained in:
Klaus Wendel, archium GmbH 2021-10-07 11:49:32 +02:00
parent 05f769f2e4
commit 32a7de3585
1 changed files with 2 additions and 3 deletions

View File

@ -36,9 +36,8 @@ func GrazeStatusChannel(sc *chan StatusChannelType, mode string, offset StatusCh
}
func GetStatusChannel(sc *chan StatusChannelType, mtxStatusChannelLock *sync.Mutex) StatusChannelType {
//defer (*mtxStatusChannelLock).Unlock()
//(*mtxStatusChannelLock).Lock()
defer (*mtxStatusChannelLock).Unlock()
(*mtxStatusChannelLock).Lock()
cvalue, cstatus := <-*sc
if cstatus {
*sc <- cvalue