Skip to content

Instantly share code, notes, and snippets.

@evilbloodydemon
Created December 13, 2013 10:39
Show Gist options
  • Select an option

  • Save evilbloodydemon/7942538 to your computer and use it in GitHub Desktop.

Select an option

Save evilbloodydemon/7942538 to your computer and use it in GitHub Desktop.
public async Task<string> Get(int id)
{
using (var conn = new RedisConnection("localhost"))
{
await conn.Open();
try
{
var value = await conn.Lists.BlockingRemoveFirstString(1, new[] {id.ToString()}, 10);
return value.Item1 + " -> " + value.Item2;
}
catch (Exception e)
{
return "wait timeout";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment