mirror of
https://github.com/logos-storage/apatheia.git
synced 2026-01-02 13:03:11 +00:00
reworking seq holder
This commit is contained in:
parent
62db65e47c
commit
512d2d66bf
@ -81,10 +81,8 @@ template checkJobArgs*[T](exp: seq[T], fut: untyped): OpenArrayHolder[T] =
|
||||
# echo "checkJobArgs::SEQ: ", $typeof(exp)
|
||||
let rval = SeqHolder[T](data: exp)
|
||||
let expPtr = OpenArrayHolder[T](data: cast[ptr UncheckedArray[T]](unsafeAddr(rval.data[0])), size: rval.data.len())
|
||||
# defer:
|
||||
# ## try and keep the value type
|
||||
# discard val.len()
|
||||
fut.addCallback proc(data: pointer) =
|
||||
## just to keep the rval GC object alive for the duration of the job
|
||||
discard rval.data.len()
|
||||
echo "FREE RVaL: ", rval.data.len()
|
||||
## TODO: how to handle cancellations?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user