File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -318,8 +318,7 @@ proc leopardEncodeTask(tp: Taskpool, task: ptr EncodeTask) {.gcsafe.} =
318318proc asyncEncode * (
319319 self: ErasureRef , blockSize, parityLen: int , blocks: seq [seq [byte ]]
320320): Future [?! seq [seq [byte ]]] {.async : (raises: [CancelledError ]).} =
321- without threadPtr =? ThreadSignalPtr .new ():
322- return failure (" Unable to create thread signal" )
321+ var threadPtr = ? ThreadSignalPtr .new ().mapFailure ()
323322 echo " In Async Encode"
324323 defer :
325324 if threadPtr != nil :
@@ -483,8 +482,8 @@ proc leopardDecodeTask(tp: Taskpool, task: ptr DecodeTask) {.gcsafe.} =
483482proc asyncDecode * (
484483 self: ErasureRef , blockSize: int , blocks, parity: seq [seq [byte ]]
485484): Future [?! seq [seq [byte ]]] {.async : (raises: [CancelledError ]).} =
486- without threadPtr =? ThreadSignalPtr .new ():
487- return failure ( " Unable to create thread signal " )
485+ var threadPtr = ? ThreadSignalPtr .new (). mapFailure ()
486+
488487 echo " In Async Decode"
489488 defer :
490489 if threadPtr != nil :
You can’t perform that action at this time.
0 commit comments