func (c *Client) AllowedToStartPulsating(serviceID uint8) bool {
	c.pulseMutex.RLock()
	pulsating := c.pulsating > 0
	c.pulseMutex.RUnlock()

	c.pulseMutex.Lock()
	if pulsating {
		c.pulseMutex.Unlock()
		return false
	}

	c.pulsating = int(serviceID)
	c.pulseMutex.Unlock()

	return true
}
// AllowedToStartPulsating you must notify when you are done pulsating!
AllowedToStartPulsating you must notify when you are done pulsating!
// AllowedToStartPulsating you must notify when you are done pulsating!
func (c *Client) AllowedToStartPulsating(serviceID uint8) bool {
	c.pulseMutex.RLock()
	pulsating := c.pulsating > 0
	c.pulseMutex.RUnlock()
	c.pulseMutex.Lock()
	if pulsating {
		c.pulseMutex.Unlock()
		return false
	}
	c.pulsating = int(serviceID)
	c.pulseMutex.Unlock()
	return true
}
func ( c * Client ) AllowedToStartPulsating ( serviceID uint8 ) bool { c . pulseMutex . RLock ( ) pulsating := c . pulsating > 0 c . pulseMutex . RUnlock ( ) c . pulseMutex . Lock ( ) if pulsating { c . pulseMutex . Unlock ( ) return false } c . pulsating = int ( serviceID ) c . pulseMutex . Unlock ( ) return true }
AllowedToStartPulsating you must notify when you are done pulsating!
AllowedToStartPulsating you must notify when you are done pulsating!