public void Deserialize(IInputArchive archive, string tag) { lock (locker) { archive.StartRecord("node"); data = archive.ReadBuffer("data"); acl = archive.ReadLong("acl"); stat = new StatPersisted(); stat.Deserialize(archive, "statpersisted"); archive.EndRecord("node"); } }
public void Deserialize(IInputArchive archive, string tag) { try { SpinWait.SpinUntil(() => Interlocked.CompareExchange(ref lockedInt, 1, 0) == 0); archive.StartRecord("node"); data = archive.ReadBuffer("data"); acl = archive.ReadLong("acl"); stat = new StatPersisted(); stat.Deserialize(archive, "statpersisted"); archive.EndRecord("node"); } finally { Interlocked.Exchange(ref lockedInt, 0); } }