You may probably know that Redis has Lua engine inside, which exposes the `redis.call(...)` function.
Redis is famously single-threaded but if I would want to make it multi-threaded, Lua scripting is one of the bigger barriers to that.
Suppose I would need to protect each `redis.call` command with mutex - it would create potential contention and overhead around each `redis.call` within a script.
But for scripts that look like:
```
redis.call('set', ...)
redis.call('lpush', ....)
```
I could theoretically recognize that these commands are not dependent on each other and pipeline them (batch them within a single protected atomic operation).
It's different from:
```
local a = redis.call('get', ...)
if a = ...
```
where the lua logic depends on the return value of the call operation and I must run it sequentially.
From what I saw in practice, many Redis lua scripts used in Redis frameworks have blocks of commands that ignore return values, so they can be batched together.
Roman