mirror of
https://github.com/logos-storage/nim-datastore.git
synced 2026-01-06 15:43:10 +00:00
switching up errors
This commit is contained in:
parent
aa01665c16
commit
35c4466de0
@ -104,8 +104,6 @@ proc newSharedDataStore*(
|
||||
return failure(err)
|
||||
|
||||
res[].value = newSharedPtr(ThreadDatastore)
|
||||
res[].signal = ThreadSignalPtr.new().valueOr:
|
||||
return failure newException(DatastoreError, "error creating signal")
|
||||
|
||||
echo "\nnewDataStore: threadId:", getThreadId()
|
||||
res.createThreadDatastore(backend)
|
||||
|
||||
@ -68,9 +68,9 @@ var
|
||||
fsDatastore {.threadvar.}: FSDatastore ##\
|
||||
## TODO: figure out a better way to capture this?
|
||||
|
||||
# proc `=destroy`*[T](x: var ThreadResult[T]) =
|
||||
# when T isnot void:
|
||||
# x.value.`=destroy`
|
||||
proc `=destroy`*[T](x: var ThreadResult[T]) =
|
||||
when T isnot void:
|
||||
x.value.`=destroy`
|
||||
|
||||
proc newThreadResult*[T](tp: typedesc[T]): Result[TResult[T], ref CatchableError] =
|
||||
let res = newSharedPtr(ThreadResult[T])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user