Skip to content

PgBackendThread

Namespace: Ankus

Assembly: Ankus.Runtime.dll

Reports whether code runs on the PostgreSQL backend thread inside a callback, the only place PostgreSQL may be called.

public static class PgBackendThread

Ankus checks this itself before every call into PostgreSQL, as pgrx’s guards do. Use these members when code is about to rely on that thread for something Ankus doesn’t check, such as handing a backend-only object to other code.

Inheritance: object

Throws unless the calling thread is the backend thread inside an active PostgreSQL callback, as pgrx’s assert_active_thread() panics.

public static void AssertActive()

Exceptions:

Gets whether the calling thread is the backend thread inside an active PostgreSQL callback.

public static bool IsActive { get; }

Value: bool