altmp / altv-issues

Issues and roadmap for alt:V project
93 stars 17 forks source link

`Alt.LogInfo()` is not thread-safe #2129

Open ghost opened 8 months ago

ghost commented 8 months ago

Description of the problem

As soon as I create a new thread in C# and use Alt.LogInfo(), it doesn't appear on a new line like Alt.Log().

image

Reproduction steps

public override void OnStart()
{
    Thread test = new Thread(() => {
        Alt.LogInfo("AltV");
    });
    test.Start();
}

Expected behaviour

image

Additional context

No response

Operating system

Windows 11 (64)

Version

rel/15.57

Crashdump ID

No response

Confirmation of issue's presence

xxshady commented 7 months ago

most likely related: https://github.com/altmp/altv-issues/issues/2109