βš™οΈThreading

Register

MTools.Threading.Register(callback, critical, other);

Name
Type
Description

callback

function

A function called in another thread.

critical

table

Optional. Releases ownership of the specified critical section object.

other

all

It is better to use 1. Other arguments.

Allows functions to be called in separate threads. Example usage:

MTools.FileSystem.CreateDir("nl\\Test");

function MonyTools()
    MTools.Network.Download("https://www.meme-arsenal.com/memes/96941a83a50bc9cbb0a4fefc5a581eac.jpg", "nl\\Test\\Meme.png");
end

local Test = MTools.Threading:Register(MonyTools, nil, 1);
-- Allows you to download any files without freezing the game.

Destroy

Thread:Destroy();

Name
Type
Description

-

-

-

Allows you to kill the flow. Example usage:

Last updated