You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have found a bug where some messages are not delivered to the Processor by the Inbox. This behavior can only be observed when processing many messages. The issue only happens under the given scenario:
[goroutine 1] Inbox is running - inbox.run()
[goroutine 1] Ring buffer is empty so the function returns - inbox.run()
[goroutine 2] A message is added to the ring buffer - inbox.Send()
[goroutine 2] The message is not scheduled because the procStatus is "running" - inbox.schedule()
[goroutine 1] The procStatus is set to "idle" - inbox.process()
No further messages are sent to the inbox so the message from step 3 is never processed.
Example:
funcTestSendMany(t*testing.T) {
e, err:=NewEngine(NewEngineConfig())
require.NoError(t, err)
fori:=0; i<100000; i++ {
done:=make(chanstruct{})
e.SpawnFunc(func(ctx*Context) {
switchctx.Message().(type) {
caseStarted:
ctx.SpawnChildFunc(func(*Context) {}, "child")
e.Stop(ctx.PID())
caseStopped:
// the child will receive a poisonPill when stopping// this will hang if the child's poisonPill is nnot processedclose(done)
}
}, "test")
timer:=time.NewTimer(time.Second)
select {
case<-done:
timer.Stop()
case<-timer.C:
t.Errorf("timed out")
return
}
}
}
The text was updated successfully, but these errors were encountered:
I have found a bug where some messages are not delivered to the Processor by the Inbox. This behavior can only be observed when processing many messages. The issue only happens under the given scenario:
No further messages are sent to the inbox so the message from step 3 is never processed.
Example:
The text was updated successfully, but these errors were encountered: