mirror of
https://github.com/logos-storage/nim-datastore.git
synced 2026-01-06 23:53:09 +00:00
more cleanup
This commit is contained in:
parent
a27102675e
commit
216a5ea518
@ -59,7 +59,7 @@ method get*(
|
||||
echo "closing signal"
|
||||
ret[].signal.close()
|
||||
|
||||
echo "\nSharedDataStore:put:value: ", ret[].repr
|
||||
print "\nSharedDataStore:put:value: ", ret[]
|
||||
let data = ret[].value.toSeq(byte)
|
||||
return success(data)
|
||||
|
||||
@ -117,8 +117,8 @@ proc newSharedDataStore*(
|
||||
echo "closing signal"
|
||||
res[].signal.close()
|
||||
|
||||
echo "\nnewSharedDataStore:state: ", res[].state.repr
|
||||
echo "\nnewSharedDataStore:value: ", res[].value[].backend.repr
|
||||
print "\nnewSharedDataStore:state: ", res[].state
|
||||
print "\nnewSharedDataStore:value: ", res[].value[].backend
|
||||
|
||||
self.tds = res[].value
|
||||
|
||||
|
||||
@ -80,15 +80,11 @@ proc newThreadResult*[T](tp: typedesc[T]): Result[TResult[T], ref CatchableError
|
||||
proc startupDatastore(
|
||||
ret: TResult[ThreadDatastorePtr],
|
||||
backend: ThreadBackend,
|
||||
count: TestPtr,
|
||||
) {.raises: [].} =
|
||||
## starts up a FS instance on a give thread
|
||||
echo "\n"
|
||||
echo "\nstartupDatastore: threadId:", getThreadId()
|
||||
echo "\nstartupDatastore: ret:\n", ret.repr
|
||||
|
||||
echo "\nstartupDatastore: backend:\n", backend.repr
|
||||
echo "\nstartupDatastore: count:\n", count.repr
|
||||
print "\nstartupDatastore: backend:\n", backend
|
||||
|
||||
echo ""
|
||||
case backend.kind:
|
||||
@ -177,10 +173,7 @@ proc createThreadDatastore*(
|
||||
try:
|
||||
echo "createThreadDatastore: start"
|
||||
ret[].value[].tp = Taskpool.new(num_threads = 2)
|
||||
# echo "\n\ncreateThreadDatastore:tp:\n", ret[].repr
|
||||
echo "\n\ncreateThreadDatastore:value:\n", ret[].value.repr
|
||||
ret[].value[].tp.spawn startupDatastore(
|
||||
ret, backend, newSharedPtr(Test(count: FSBackend)))
|
||||
ret[].value[].tp.spawn startupDatastore(ret, backend)
|
||||
echo "createThreadDatastore: done"
|
||||
ret[].state = Success
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user