mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-05 15:03:07 +00:00
fix nil pointer assignmen
This commit is contained in:
parent
2f91cf2bea
commit
48600dd398
@ -318,8 +318,7 @@ proc leopardEncodeTask(tp: Taskpool, task: ptr EncodeTask) {.gcsafe.} =
|
||||
proc asyncEncode*(
|
||||
self: ErasureRef, blockSize, parityLen: int, blocks: seq[seq[byte]]
|
||||
): Future[?!seq[seq[byte]]] {.async: (raises: [CancelledError]).} =
|
||||
without threadPtr =? ThreadSignalPtr.new():
|
||||
return failure("Unable to create thread signal")
|
||||
var threadPtr = ?ThreadSignalPtr.new().mapFailure()
|
||||
echo "In Async Encode"
|
||||
defer:
|
||||
if threadPtr != nil:
|
||||
@ -483,8 +482,8 @@ proc leopardDecodeTask(tp: Taskpool, task: ptr DecodeTask) {.gcsafe.} =
|
||||
proc asyncDecode*(
|
||||
self: ErasureRef, blockSize: int, blocks, parity: seq[seq[byte]]
|
||||
): Future[?!seq[seq[byte]]] {.async: (raises: [CancelledError]).} =
|
||||
without threadPtr =? ThreadSignalPtr.new():
|
||||
return failure("Unable to create thread signal")
|
||||
var threadPtr = ?ThreadSignalPtr.new().mapFailure()
|
||||
|
||||
echo "In Async Decode"
|
||||
defer:
|
||||
if threadPtr != nil:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user