diff --git a/datastore/sharedds.nim b/datastore/sharedds.nim index 8c33455..4c84379 100644 --- a/datastore/sharedds.nim +++ b/datastore/sharedds.nim @@ -11,6 +11,7 @@ import ./key import ./query import ./datastore import ./threadbackend +import threading/smartptrs export key, query, ThreadBackend @@ -78,7 +79,9 @@ proc newSharedDataStore*( var self = SharedDatastore() - # res = newThreadResult(ThreadDatastorePtr) + res = newThreadResult(ThreadDatastorePtr) + + let buf = DataBuffer.new() # res[].signal = ThreadSignalPtr.new().valueOr: # return failure newException(DatastoreError, "error creating signal") diff --git a/datastore/threadbackend.nim b/datastore/threadbackend.nim index 6f5c0dc..bdcbf22 100644 --- a/datastore/threadbackend.nim +++ b/datastore/threadbackend.nim @@ -54,7 +54,7 @@ type ThreadDatastorePtr* = SharedPtr[ThreadDatastore] -proc newThreadResult*[T](tp: typedesc[T]): SharedPtr[ThreadResult[T]] = +proc newThreadResult*[T](tp: typedesc[T]): TResult[T] = newSharedPtr(ThreadResult[T]) proc startupDatastore(