What is the difference between linearizability and serializability?

后端 未结 5 696
别跟我提以往
别跟我提以往 2021-01-29 19:26

What is the difference between linearizability and serializability (in the context of Java)? Can you please explain the difference between these with an example or provide a goo

5条回答
  •  借酒劲吻你
    2021-01-29 19:49

    See @andersoj's answer for a clear description of the difference between serializability and linearizability.

    This is only indirectly relevant to Java concurrent programming. In general, a concurrent Java program does not need to have either a serializable or linearizable history. In the cases that do, serializability is generally sufficient for a program (Java or otherwise) for "correctness", though particular problems could require the stronger linearizability property. But either way, it is the problem that determines the correctness requirements, not Java.

提交回复
热议问题