January 2020
Intermediate to advanced
532 pages
13h 31m
English
Elements in a SharedArray must be bits type. What does that mean? The formal definition of bits type can be summarized as follows:
The following OrderItem type is a bits type because all fields are primitive types:
struct OrderItem order_id::Int item_id::Int price::Float64 quantity::Intend
The following Customer type is not a bits type because it contains a reference to String, which is neither a primitive type nor a bits type:
struct Customer name::String age::Intend
Let's try to create SharedArray for a bits type. The following code confirms that it works properly:
If we try to create SharedArray with a non-bits ...
Read now
Unlock full access