Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtdeh committed Feb 24, 2024
1 parent 5d0d17d commit fd45296
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions chanswitch.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,14 @@ func (b *ChanSwitch) Make(v any) *Channels {

// set filed value
func (b *ChanSwitch) Set(v any) {
fmt.Println("debug 1")
b.l.Lock()
defer b.l.Unlock()
fmt.Println("debug 2")
// get filter by value
ch := b.filters[v]
// update val
b.val = v
// distract repeated goroutines for change filter
b.distract <- struct{}{}
fmt.Println("debug 3")
// reset once channel
activeChan(ch.once)

Expand Down

0 comments on commit fd45296

Please sign in to comment.