123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172module juptune.event.loop.core;
struct EventLoop
{
/++ STRUCTS ++/
///
struct LinuxKernal
{
/++ VARIABLES ++/
///
int major;
///
int minor;
///
int patch;
}
/++ ALIASES ++/
///
alias SignalHandler = void function() shared ;
///
alias __xdtor = __MARMOS_BUG__;
///
alias __xpostblit = __MARMOS_BUG__;
/++ FUNCTIONS ++/
///
static void _sharedStaticCtor_L30_C1();
/// Creates a new thread.
void addGCThread(void function() initialFiber);
/// Creates a new thread that is specifically for @nogc code.
void addNoGCThread(void function() initialFiber);
/// Cancels all active threads.
void cancelAllThreads();
/// ditto.
void execGC(void function() fiber);
/// Similar to addNoGCThread and addGCThread , except the caller thread will immediately block until, waiting until the thread spawned by this function resolves.
void execNoGC(void function() fiber);
/// Blocks the current thread until all threads have finished.
void join();
/// Converts a errno value into a Result .
Result linuxErrorAsResult(string staticMessage, int errnum);
///
void linuxResetSignalHandler(int SignalNum)();
///
void linuxSetSignalHandler(int SignalNum)(SignalHandler handler);
/++ MANIFEST CONSTANTS ++/
///
enum int LINUX_ERROR_BUFFER_SIZE = 1024;
/++ ENUMS ++/
/// Result.make requires an enum type for strong typing, however I'm not going to make let alone maintain a list of all linux errors, so we'll get by with just cast(LinuxError) and cast(int) shennanigans if the error code is truly needed directly from a Result - which chances are unlikely to be the case.
enum LinuxError : int
{
///
none = 0,
///
cancelled = 125
}
/++ VARIABLES ++/
///
const shared LinuxKernal g_linuxKernal;
}
Event loop
Provides an EventLoop.
Please see the repo's documentation for more information about the event loop and how it works.
Multiple event loops may exist per thread.
| Name | Description |
|---|---|
| SignalHandler | |
| __xdtor | |
| __xpostblit |
| Name | Description |
|---|---|
| LINUX_ERROR_BUFFER_SIZE |
| Name | Description |
|---|---|
| LinuxError |
Result.make requires an enum type for strong typing, however I'm not going to make let alone maintain a list of all linux errors, so we'll get by with just |
| Name | Description |
|---|---|
| _sharedStaticCtor_L30_C1 | |
| addGCThread |
Creates a new thread. |
| addNoGCThread |
Creates a new thread that is specifically for @nogc code. |
| cancelAllThreads |
Cancels all active threads. |
| execGC |
ditto. |
| execNoGC |
Similar to |
| join |
Blocks the current thread until all threads have finished. |
| linuxErrorAsResult |
Converts a errno value into a |
| linuxResetSignalHandler | |
| linuxSetSignalHandler |
| Name | Description |
|---|---|
| LinuxKernal |
| Name | Description |
|---|---|
| g_linuxKernal |