hapi_rs

Module session

Source
Expand description

Session is responsible for communicating with HAPI

The Engine promises to be thread-safe when accessing a single Session from multiple threads. hapi-rs relies on this promise and the Session struct holds only an Arc pointer to the session, and does not protect the session with Mutex, although there is a parking_lot::ReentrantMutex private member which is used internally in a few cases where API calls must be sequential.

When the last instance of the Session is about to get dropped, it’ll be cleaned up (if SessionOptions::cleanup was set) and automatically closed.

The Engine process (pipe or socket) can be auto-terminated as well if told so when starting the server: See start_engine_pipe_server and start_engine_socket_server

quick_session terminates the server by default. This is useful for quick one-off jobs.

Re-exports§

Structs§

Enums§

Traits§

Functions§

Type Aliases§