From 13eaf47c164622aace3012e62013ae8a7fd3f3ab Mon Sep 17 00:00:00 2001 From: Jaremy Creechley Date: Tue, 5 Sep 2023 15:34:40 -0700 Subject: [PATCH] more docs --- datastore/threadresults.nim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/datastore/threadresults.nim b/datastore/threadresults.nim index a59e394..3afdaad 100644 --- a/datastore/threadresults.nim +++ b/datastore/threadresults.nim @@ -1,6 +1,7 @@ import pkg/chronos/threadsync import pkg/threading/smartptrs +import std/locks import ./databuffer @@ -25,9 +26,9 @@ type ## SharedPtr that allocates a shared buffer and keeps the ## memory allocated until all references to it are gone. ## - ## Since ThreadResult is a plain object, and if its lifetime is - ## tied to that of an async proc or the thread-backend request - ## it could be freed before the other thread is finished. + ## Since ThreadResult is a plain object, its lifetime can be + ## tied to that of an async proc. In this case it could be + ## freed before the other background thread is finished. ## ## For example, `myFuture.cancel()` can end an async proc early. ## If the ThreadResult was stored in the async's memory then it'd