reworking seq holder

This commit is contained in:
Jaremy Creechley 2024-02-15 15:32:51 -07:00
parent 512d2d66bf
commit 8476613d69

View File

@ -82,7 +82,7 @@ template checkJobArgs*[T](exp: seq[T], fut: untyped): OpenArrayHolder[T] =
let rval = SeqHolder[T](data: exp)
let expPtr = OpenArrayHolder[T](data: cast[ptr UncheckedArray[T]](unsafeAddr(rval.data[0])), size: rval.data.len())
fut.addCallback proc(data: pointer) =
## just to keep the rval GC object alive for the duration of the job
## keep the rval GC object alive for duration of the job
discard rval.data.len()
echo "FREE RVaL: ", rval.data.len()
## TODO: how to handle cancellations?