Why a function is thread safe when all references to the shared data are
serialized?
From HERE I read that
A thread-safe function can be called simultaneously from multiple threads,
even when the invocations use shared data, because all references to the
shared data are serialized.
I know to make a segment of code thread safe we use locks so that only one
thread at a time can access it. But here it says a thread safe function
can be called simultaneously because all it's data are serialized. I don't
understand how serializing the references can make a function thread safe?
Thanks.
No comments:
Post a Comment