mirror of
https://github.com/logos-storage/nim-datastore.git
synced 2026-01-03 14:13:09 +00:00
fixes
This commit is contained in:
parent
28097881f8
commit
8644cbc9dc
@ -75,14 +75,14 @@ method close*(
|
||||
# TODO: how to handle failed close?
|
||||
return success()
|
||||
|
||||
func newSharedDataStore*(
|
||||
proc newSharedDataStore*(
|
||||
# T: typedesc[SharedDatastore],
|
||||
backend: ThreadBackend,
|
||||
): ?!SharedDatastore =
|
||||
|
||||
var
|
||||
self = SharedDatastore()
|
||||
res = newThreadResult(ThreadDatastore)
|
||||
res = newThreadResult(ThreadDatastorePtr)
|
||||
|
||||
res[].signal = newSignal()
|
||||
res.createThreadDatastore(backend)
|
||||
|
||||
@ -51,7 +51,7 @@ type
|
||||
|
||||
ThreadDatastorePtr* = SharedPtr[ThreadDatastore]
|
||||
|
||||
proc newThreadResult*[T](tp: typedesc[TResult[T]]): TResult[T] =
|
||||
proc newThreadResult*[T](tp: typedesc[T]): UniquePtr[ThreadResult[T]] =
|
||||
newUniquePtr(ThreadResult[T])
|
||||
|
||||
proc startupDatastore(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user