std1.0.0-beta-7 SafeC docs

std :: async::host

Struct std::HostPark

#include <std/async/host.h> source

struct HostPark {
    unsigned long long mu;
    unsigned long long cv;
    int permit;
    int ok;
}

Fields

§unsigned long long musource

std/thread.h mutex

§unsigned long long cvsource

and condition variable

§int permitsource

an unpark() that no park() has consumed yet

§int oksource

mu/cv were created

Methods

§static struct HostPark new()source · definition

Creates the mutex and condition variable; destroy() frees them.

§void drop()source · definition
§void destroy() consumesource · definition

= drop()

§long long now_ms()source · definition
§void park(long long timeout_ms)source · definition
§void unpark()source · definition