Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Race fix #2

Merged
merged 11 commits into from
Jul 23, 2024
4 changes: 4 additions & 0 deletions run_loop.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package pipelaner

import (
"reflect"
"sync"
"sync/atomic"
)
Expand Down Expand Up @@ -115,6 +116,9 @@ func (s *runLoop) run() {
if msg == nil {
continue
}
if reflect.ValueOf(msg).Kind() == reflect.Pointer {
msg = reflect.ValueOf(msg).Elem()
}
semaphoreLock()
go func(m any) {
defer semaphoreUnlock()
Expand Down
Loading