Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for mies (0.14 sec)

  1. internal/pubsub/pubsub.go

    	subs []*Sub[T]
    	sync.RWMutex
    }
    
    // Publish message to the subscribers.
    // Note that publish is always non-blocking send so that we don't block on slow receivers.
    // Hence receivers should use buffered channel so as not to miss the published events.
    func (ps *PubSub[T, M]) Publish(item T) {
    	ps.RLock()
    	defer ps.RUnlock()
    	for _, sub := range ps.subs {
    		if sub.types.Contains(Mask(item.Mask())) && (sub.filter == nil || sub.filter(item)) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Feb 06 16:57:30 GMT 2024
    - 5.2K bytes
    - Viewed (0)
Back to top