I guess this is for Arraq:

Threadpool has been deprecated, but it's such a clever and handy api.

It allows me to write something like this:
    
    
    proc move*(hypothetical:Hypothetic,dice:openArray[int]):Move =
      var flowMoves:seq[FlowVar[Move]]
      for pieceNr,fromSquare in hypothetical.pieces:
        if fromSquare != 0 or hypothetical.cash >= piecePrice:
          for die in dice:
            flowMoves.add spawn hypothetical.bestMove(pieceNr,fromSquare,die)
      flowMoves.mapIt(^it).sortedByIt(it.eval)[^1]
    
    
    Run

It's so concise and imminently readable - in perfect Nim fashion.

Is it really not possible to preserve this api?

Reply via email to