[nim-dev] Re: How to get rid of Error: 'spawn' takes a GC safe call expression with the redis client

  • From: qio <info.qio.io@xxxxxxxxx>
  • To: nim-dev@xxxxxxxxxxxxx
  • Date: Wed, 9 Dec 2015 19:28:38 +0000

The problem only happens with Redis.bRPop proc. Any ideas?

```
proc bRPop*(r: Redis, keys: varargs[string], timeout: int): RedisList =
## Remove and get the *last* element in a list, or block until one
## is available.
var args: seq[string] = @[]
for i in items(keys): args.add(i)
args.add($timeout)
r.sendCommand("BRPOP", args)
return r.readArray()

```

Other related posts: