Nix  2.93.0-dev
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
async.hh File Reference
#include "lix/libutil/result.hh"
#include "lix/libutil/signals.hh"
#include <future>
#include <kj/async-io.h>
#include <kj/async.h>
Include dependency graph for async.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  nix::AsyncContext
 
struct  nix::AsyncIoRoot
 

Macros

#define LIX_RUN_ASYNC_IN_NEW_THREAD(...)
 
#define LIX_TRY_AWAIT(...)   (::nix::detail::materializeResult(co_await (__VA_ARGS__)))
 

Functions

AsyncContextnix::AIO ()
 
void nix::detail::materializeResult (Result< void > r)
 
template<typename T >
nix::detail::materializeResult (Result< T > r)
 
template<typename T >
nix::detail::runAsyncUnwrap (T t)
 
template<typename T >
nix::detail::runAsyncUnwrap (Result< T > t)
 
auto nix::detail::runAsyncInNewThread (std::invocable< AsyncIoRoot & > auto fn)
 

Macro Definition Documentation

◆ LIX_RUN_ASYNC_IN_NEW_THREAD

#define LIX_RUN_ASYNC_IN_NEW_THREAD ( ...)
Value:
::nix::detail::runAsyncInNewThread([&](AsyncIoRoot & AIOROOT) { \
return AIOROOT.blockOn(__VA_ARGS__); \
})