Open olange opened 5 years ago
Note that Symbol
-properties do not get passed in/out workers by the structured clone algorithm (see Experiment 03 in olange/learning-service-workers), because they are not enumerable properties.
So if we would use a Symbol
-property for the metadata and if we would implement the data-pipes as a service worker and sub-workers, then we would need to pass them as ordinary properties and eventually prune/graft them as Symbols upon reception in the browser context.
Find a way to attach metadata to our data-structures.
Directions
Attach a
metadata
Symbol to data-structures. Use only native objects (Boolean, Number, String, …) to represent terminal values, instead of built-in primitive values – see first comment hereafter; good idea, but they do not pass in/out workers.Motivation