Skip to content

Instantly share code, notes, and snippets.

@amix
Created March 13, 2014 11:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amix/9526859 to your computer and use it in GitHub Desktop.
Save amix/9526859 to your computer and use it in GitHub Desktop.
select {
case <- messageListener:
newData = c.GetMessages(offset)
listener <- newData
case <- time.After(ChannelTimeoutSec * time.Second):
listener <- ReturnDataEmpty
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment