Browse Source

Wieder mit Mutex

master
Klaus Wendel 1 year ago
parent
commit
32a7de3585
  1. 5
      channels/channels.go

5
channels/channels.go

@ -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

Loading…
Cancel
Save