예제 #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);
 }
예제 #2
0
 public static void ConcurrentWriter(KeyStruct *key, ValueStruct *src, ValueStruct *dst)
 {
     ValueStruct.AcquireWriteLock(dst);
     ValueStruct.Copy(src, dst);
     ValueStruct.ReleaseWriteLock(dst);
 }