Пример #1
0
//Close the snapshot
func (s *fdbSnapshot) Close() error {

	count := platform.AddInt32(&s.refCount, int32(-1))

	if count < 0 {
		logging.Errorf("ForestDBSnapshot::Close Close operation requested " +
			"on already closed snapshot")
		return errors.New("Snapshot Already Closed")

	} else if count == 0 {
		go s.Destroy()
	}

	return nil
}
Пример #2
0
func (s *fdbSnapshot) Open() error {
	platform.AddInt32(&s.refCount, int32(1))

	return nil
}