I'm building an application using Lwt, and it would be nice for me to be able to have some sort of context, or promise local static storage for the life cycle of the promise. Is there any way to do this? Ideally it could be a simple Map that is available to each promise.
Ideally it would be like:
val get_lwt_context : 'a Lwt.t -> 'a Map.t
This would return the storage context for promise t
. Is this possible? Is there another library that implements this?