• Meir Shpilraien (Spielrein)'s avatar
    Support for RM_Call on blocking commands (#11568) · d0da0a6a
    Meir Shpilraien (Spielrein) authored
    Allow running blocking commands from within a module using `RM_Call`.
    
    Today, when `RM_Call` is used, the fake client that is used to run command
    is marked with `CLIENT_DENY_BLOCKING` flag. This flag tells the command
    that it is not allowed to block the client and in case it needs to block, it must
    fallback to some alternative (either return error or perform some default behavior).
    For example, `BLPOP` fallback to simple `LPOP` if it is not allowed to block.
    
    All the commands must respect the `CLIENT_DENY_BLOCKING` flag (including
    module commands). When the command invocation finished, Redis asserts that
    the client was not blocked.
    
    This PR introduces the ability to call blocking command using `RM_Call` by
    passing a callback that will be called when the client will get unblocked.
    In order to do that, the user must explicitly say that he allow to perform blocking
    command by passing a new format specifier argument, `K`, to the `RM_Call`
    funct...
    d0da0a6a
runtest-moduleapi 1.69 KB