Home

Awesome

<img src="https://ptsochantaris.github.io/trailer/MaintiniLogo.webp" alt="Logo" width=256 align="right">

Maintini

A friendly and efficient wrapper for wrapping operations so that:

Currently used in

Detailed docs can be found here

Overview

Maintini.setup() // Always call this at app launch to set things up
...

func anExampleWithABlockCall() async {
    await Maintini.maintain {
        await processingThatShouldNotBeInterrupted()
    }
}

func anExampleWithADeferredCall() async {
    Maintini.startMaintaining()
    defer {
        Maintini.endMaintaining()
    }
    await processingThatShouldNotBeInterrupted()
}

func anExampleWithNestedCalls() async {
    Maintini.startMaintaining()

    Task {
        await processingThatShouldNotBeInterrupted()

        await anExampleWithADeferredCall()

        await anExampleWithABlockCall()

        Maintini.endMaintaining()
    }
}

License

Copyright (c) 2023 Paul Tsochantaris. Licensed under the MIT License, see LICENSE for details.