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
The v23 context functions (eg. WithNewPrincipal) rely on a storing a pointer to the currently initialized runtime in the context. This accessed by the initStateData.currentRuntime() method. This method checks to ensure that the runtime has been initialized, ie. is non-nil.
ifi.runtime==nil {
panic(`Calling v23 method during runtime initialization. You cannotcall v23 methods until after the runtime has been constructed. You maybe able to move the offending caller to the Runtime.Init() method of yourruntime implementation.`)
}
However, the runtime may be nil under two circumstances:
it has yet to be initialized, and the error message above makes sense
the runtime's shutdown function (returned when it is created) has been called, in which case, the error message above is confusing.
Situation 2 can arise if a process has go routines that are still running when shutdown is called that attempt, for example, to make an RPC. Although this is an application programming error, the error message and v23 package code should be modified to distinguish the two cases.
The text was updated successfully, but these errors were encountered:
The v23 context functions (eg. WithNewPrincipal) rely on a storing a pointer to the currently initialized runtime in the context. This accessed by the initStateData.currentRuntime() method. This method checks to ensure that the runtime has been initialized, ie. is non-nil.
However, the runtime may be nil under two circumstances:
Situation 2 can arise if a process has go routines that are still running when shutdown is called that attempt, for example, to make an RPC. Although this is an application programming error, the error message and v23 package code should be modified to distinguish the two cases.
The text was updated successfully, but these errors were encountered: