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
{{ message }}
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.
CAVEAT - The Ref unpickler should probably actually just be a direct runtime call, rather than what happens now.
Proposal
// Note: The RefRegistry should actually be a TLS, and handle a specific pickle/unpickle call.traitRefRegistry {
// PicklingdefregisterPicklee(picklee: Any):Int// UnpicklingdefpreregisterUnpicklee():IntdefregsiterUnpicklee(oid: Int, value: Any):UnitdeflookupUnpicklee(oid: Int):Option[Any]
// Removes all instances from the registry. This should be done AFTER a top-level unpickle/pickle call.defclear():Unit
}
// User-Facing API (for making picklers)// Each of these methods NEEDS to be 100% thread-safe.traitPicklerRegistry {
deflookupUnpickler[T]:Unpickler[T]
deflookupPickler[T]:Pickler[T]
defregisterPickler[T](p: Pickler[T]):UnitdefregisterUnpickler[T](p: Unpickler[T]):Unit// TODO - Some kind of clean or inspect what we have?
}