Esempio n. 1
0
 public void Serialize(IOutputArchive archive, string tag)
 {
     lock (locker)
     {
         archive.StartRecord(this, "node");
         archive.WriteBuffer(data, "data");
         archive.WriteLong(acl, "acl");
         stat.Serialize(archive, "statpersisted");
         archive.EndRecord(this, "node");
     }
 }
Esempio n. 2
0
 public void Serialize(IOutputArchive archive, string tag)
 {
     try
     {
         SpinWait.SpinUntil(() => Interlocked.CompareExchange(ref lockedInt, 1, 0) == 0);
         archive.StartRecord(this, "node");
         archive.WriteBuffer(data, "data");
         archive.WriteLong(acl, "acl");
         stat.Serialize(archive, "statpersisted");
         archive.EndRecord(this, "node");
     }
     finally
     {
         Interlocked.Exchange(ref lockedInt, 0);
     }
 }