On 2013-02-19 04:26, Steven Schveighoffer wrote:

Most likely a mutex is a core library feature, and we can mark it as not
serializeable.  If (when?) phobos gets serialization, I would expect the
core types to be marked as such.

Exactly. IO objects, threads are also included in this category.

I would expect that something that complex has to be specifically
written to deal with serialization.

Yes, exactly, see my other reply:

http://forum.dlang.org/thread/[email protected]?page=4#post-kfvard:242nfi:241:40digitalmars.com

Just because someone is stupid and tries to serialize a non-serializable
construct such as a gui toolkit, it's not the serializer's fault.

I don't think opt-in is stupid, it's just a more conservative set of
rules.  I think the number of constructs that WON'T be serializable will
be far less than the ones that will be.

I agree.

And multi-thread access items could be made opt-in.  I'm not sure what
Orange does now.

Orange just serialize everything. I haven't actually tried with anything marked as "shared". Perhaps I should do that.

--
/Jacob Carlborg

Reply via email to