Skip to content

Commit

Permalink
disable locking os thread due to bugs (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
anthdm committed Mar 3, 2023
1 parent c064d48 commit 714783e
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions actor/inbox.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package actor

import (
"runtime"

"github.com/anthdm/hollywood/ggq"
"github.com/anthdm/hollywood/log"
)
Expand Down Expand Up @@ -32,15 +30,15 @@ func (in *Inbox) Consume(msgs []Envelope) {

func (in *Inbox) Start(proc Processer) {
in.proc = proc
var lockOSThread bool
// var lockOSThread bool
// prevent race condition here be reassigning before go routine.
if LOCK_OS_THREAD {
lockOSThread = true
}
// if LOCK_OS_THREAD {
// lockOSThread = true
// }
go func() {
if lockOSThread {
runtime.LockOSThread()
}
// if lockOSThread {
// runtime.LockOSThread()
// }
in.ggq.ReadN()
}()
log.Tracew("[INBOX] started", log.M{"pid": proc.PID()})
Expand Down

0 comments on commit 714783e

Please sign in to comment.