Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

redisBRPop

Blocking List Pop


Description

Pop the first available value from a key or list of keys, blocking until a value is available.

Usage

redisBRPop(keys, timeout = 0, ...)

Arguments

keys

A character key value or vector of key values to monitor.

timeout

A timeout in seconds after which, if no value is available, the function returns NULL. A value of zero indicates block indefinitely.

...

Optional additional arguments. Specify raw=TRUE to skip de-serialization of the data.

Details

redisBRPop blocks until at least one of the keys exists and contains a non-empty value, or until the specified timeout period is reached, whichever comes first. Keys are scanned in the order that they are specified.

Value

redisBRPop returns NULL after the timeout period, or a list containing:

key

The first key encountered with an available value,

value

The corresponding value.

Author(s)

B. W. Lewis

References

http://redis.io/commands

See Also

redisBLpop

Examples

## Not run: 
redisConnect()
redisBLpop('x', 5)
redisLPush('x',runif(5))
redisBRPop('x')

## End(Not run)

rredis

"Redis" Key/Value Database Client

v1.7.0
Apache License (>= 2.0)
Authors
B. W. Lewis
Initial release
2015-07-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.