lailongwei / llbc

一个简洁、高效、跨平台、多语言支持的服务端开发框架,面向Service及Component,底层c++实现。
MIT License
104 stars 33 forks source link

【llbc】Service完整简化、梳理 #147

Closed lailongwei closed 1 year ago

lailongwei commented 1 year ago

完整简化、梳理Service,集中于以下几个方面:

lailongwei commented 1 year ago

Service运行流程:

class LLBC_ServiceRunningPhase
{
public:
    enum ENUM
    {
        Begin = 0,

        // Service has not been started.
        NotStarted = Begin,

        // Service pre-starting(Perform some preparatory work before initializing components).
        PreStarting,
        // Specific service pre-start failed.
        PreStartFailed,
        // Service has been pre-started.
        PreStarted,

        // Service is currently initializing components.
        InitingComps,
        // Specific service initialize components failed.
        InitCompsFailed,
        // Service has been initialized all components.
        CompsInited,

        // Service is currently starting components.
        StartingComps,
        // Specific service start components failed.
        StartCompsFailed,
        // Service has been started all components.
        CompsStarted,

        // Service has been started.
        Started,

        // Service is currently stopping components.
        StoppingComps,

        // Service is currently stopping.
        Stopping,

        End,
    };
};
lailongwei commented 1 year ago

已完整完整,Service流程标准化的同时,整体代码也得到的简化