Wieder mit Mutex
This commit is contained in:
parent
05f769f2e4
commit
32a7de3585
|
@ -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…
Reference in New Issue