Asynchronous operations

Prosody contains support for asynchronous operations.

The main focus of this feature is to allow modules to perform storage operations without blocking the entire server.

Storage plugins can now take advantage of our new util.async API.

Code that uses asynchronous storage needs to be running inside an "asynchronous context". Prosody will automatically do this for plugins, and it is rare that you will ever need to create such a context yourself.

Warnings and errors

To help developers understand the different error situations that can occur with using asynchronous code in Prosody, each has been assigned a unique ID.


As part of the upgrade to the new asynchronous storage support, we need to ensure that all code that interacts with storage is upgraded to support asynchronous operations. If you see this error, it means that some code is not yet async-ready. It is currently harmless if your storage plugin does not yet support async, however it is important that the code is updated to allow support for async storage plugins.

This error will start out only as a warning, and will be upgraded to an error at a future time.

If you encounter this warning while using Prosody code, please report an issue.