Browse Source

Test ohne den scheiß Mutex

master
Klaus Wendel 9 months ago
parent
commit
05f769f2e4
  1. 5
      channels/channels.go

5
channels/channels.go

@ -36,8 +36,9 @@ 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