{"action":"opened","issue":{"url":"https://api.github.com/repos/nim-lang/redis/issues/2","labels_url":"https://api.github.com/repos/nim-lang/redis/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/nim-lang/redis/issues/2/comments","events_url":"https://api.github.com/repos/nim-lang/redis/issues/2/events","html_url":"https://github.com/nim-lang/redis/issues/2","id":121344174,"number":2,"title":"How to get rid of Error: 'spawn' takes a GC safe call expression with the redis client","user":{"login":"qio-io","id":15605488,"avatar_url":"https://avatars.githubusercontent.com/u/15605488?v=3","gravatar_id":"","url":"https://api.github.com/users/qio-io","html_url":"https://github.com/qio-io","followers_url":"https://api.github.com/users/qio-io/followers","following_url":"https://api.github.com/users/qio-io/following{/other_user}","gists_url":"https://api.github.com/users/qio-io/gists{/gist_id}","starred_url":"https://api.github.com/users/qio-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qio-io/subscriptions","organizations_url":"https://api.github.com/users/qio-io/orgs","repos_url":"https://api.github.com/users/qio-io/repos","events_url":"https://api.github.com/users/qio-io/events{/privacy}","received_events_url":"https://api.github.com/users/qio-io/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-09T21:36:34Z","updated_at":"2015-12-09T21:36:34Z","closed_at":null,"body":"This doesn't work:\r\n\r\n```\r\nimport  os, times, posix, logging, redis, threadpool\r\n\r\n{.experimental.}\r\n\r\nvar running = true\r\n\r\nproc proc_spawned()  =\r\n  let redis_con = redis.open()\r\n  defer: redis_con.quit\r\n  \r\n  while running == true:\r\n    echo(\"bRPop\")\r\n    discard redis_con.bRPop(\"test\", 1000)\r\n    os.sleep(1000)\r\n\r\nspawn proc_spawned()\r\n\r\n```\r\n\r\nThe problem i identified, happens with Redis.bRPop proc, but doesn't happen with Redis.rPop proc.\r\n\r\n```\r\nproc bRPop*(r: Redis, keys: varargs[string], timeout: int): RedisList =\r\n  ## Remove and get the *last* element in a list, or block until one\r\n  ## is available.\r\n  var args: seq[string] = @[]\r\n  for i in items(keys): args.add(i)\r\n  args.add($timeout)\r\n  r.sendCommand(\"BRPOP\", args)\r\n  return r.readArray()\r\n\r\n```"}}