A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
Loading...
Searching...
No Matches
boundary.cc File Reference

The service library's exception boundary. More...

#include <memory>
#include <optional>
#include <utility>
#include "a11/concurrency/internal/exception_guard_future.h"
#include "a11/data/types.h"
#include "a11/internal/exception_guard_impl.h"
#include "a11/net/wire_stream.h"
#include "a11/service/internal/exception_guarded_callbacks.h"
#include "a11/service/session.h"

Namespaces

namespace  a11
 
namespace  a11::service
 
namespace  a11::service::internal
 

Functions

OnSessionStreamMessage a11::service::internal::GuardOnStreamMessage (OnSessionStreamMessage callback)
 
OnSessionStreamDone a11::service::internal::GuardOnStreamDone (OnSessionStreamDone callback)
 

Detailed Description

The service library's exception boundary.

Compiled with exceptions (see the exception policy block in cpp/CMakeLists.txt). A session's two stream callbacks belong to whoever created the session – in practice a Python agent through the bindings – and the session invokes them from its own fibers, so they are wrapped here where a raised exception can still be caught. a11/exception_guard.h has the reasoning.