adding testing

This commit is contained in:
Jaremy Creechley 2023-08-24 19:55:44 -07:00
parent f7a4f82e9b
commit b13758dd30
No known key found for this signature in database
GPG Key ID: 4E66FB67B21D3300
2 changed files with 5 additions and 2 deletions

View File

@ -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")

View File

@ -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(