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
It's known that certain CUE API operations aren't safe for use in multiple goroutines simultaneously, within the same *cue.Context. (This issue itself needs larger-scale treatment than we're looking at here). In #67/ 45ac142 i introduced an internal mutex intended to help with this a bit. That was quite the sledgehammer, as it basically forces most operations within a thema.Runtime through a single mutex.
In looking through the CUE stdlib gocodec package , i noticed that for cases where the resultant cue.Values don't escape the scope of the call/modifications to the context need not be preserved, such as in Validate, they seem to aim at enabling greater concurrency by forking a separate context. We should explore something similar.
Aside, the gocodec package presents a Go interface to CUE that is functionally similar to Thema, but without the formal structures and invariants - it's worth plumbing for some other ideas, though it doesn't look like direct reuse is a good idea, if only because then we'd be doubling mutexes.
The text was updated successfully, but these errors were encountered:
It's known that certain CUE API operations aren't safe for use in multiple goroutines simultaneously, within the same
*cue.Context
. (This issue itself needs larger-scale treatment than we're looking at here). In #67/ 45ac142 i introduced an internal mutex intended to help with this a bit. That was quite the sledgehammer, as it basically forces most operations within athema.Runtime
through a single mutex.In looking through the CUE stdlib gocodec package , i noticed that for cases where the resultant
cue.Value
s don't escape the scope of the call/modifications to the context need not be preserved, such as inValidate
, they seem to aim at enabling greater concurrency by forking a separate context. We should explore something similar.Aside, the gocodec package presents a Go interface to CUE that is functionally similar to Thema, but without the formal structures and invariants - it's worth plumbing for some other ideas, though it doesn't look like direct reuse is a good idea, if only because then we'd be doubling mutexes.
The text was updated successfully, but these errors were encountered: