Marmos
v juptune
v asn1
v lang
v ast
v Classes
v Enums
v ir
v parser
v Enums
v Structs
v core
v crypto
v keyexchange
v memory
v data
v alphabet
v buffer
v json
v builder
v parser
v Enums
v Structs
v serialise
v Structs
v Templates
v pem
v Enums
v Structs

Structs EventLoop

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
module 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;
}

Documentation

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.

Aliases

Name Description
SignalHandler
__xdtor
__xpostblit

Constants

Name Description
LINUX_ERROR_BUFFER_SIZE

Enums

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 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.

Functions

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 addNoGCThreadand addGCThread, except the caller thread will immediately block until, waiting until the thread spawned by this function resolves.

join

Blocks the current thread until all threads have finished.

linuxErrorAsResult

Converts a errno value into a Result.

linuxResetSignalHandler
linuxSetSignalHandler

Structs

Name Description
LinuxKernal

Variables

Name Description
g_linuxKernal