Esempio n. 1
0
 public static void InPlaceUpdater(KeyStruct *key, InputStruct *input, ValueStruct *value)
 {
     ValueStruct.AcquireWriteLock(value);
     value->vfield1 += input->ifield1;
     value->vfield2 += input->ifield2;
     ValueStruct.ReleaseWriteLock(value);
 }
Esempio n. 2
0
 public static void ConcurrentWriter(KeyStruct *key, ValueStruct *src, ValueStruct *dst)
 {
     ValueStruct.AcquireWriteLock(dst);
     ValueStruct.Copy(src, dst);
     ValueStruct.ReleaseWriteLock(dst);
 }