Locks and exception-resilience.

This commit is contained in:
Luka Vandervelden 2020-07-24 13:31:05 +02:00
parent 4fe2719f31
commit d0813205e6

View File

@ -61,6 +61,10 @@ abstract class DODB::Storage(V)
release_lock "index" release_lock "index"
index # FIXME: Should we really return the internal key? index # FIXME: Should we really return the internal key?
rescue e
release_lock "index"
raise e
end end
def each(reversed : Bool = false, start_offset = 0, end_offset : Int32? = nil) def each(reversed : Bool = false, start_offset = 0, end_offset : Int32? = nil)