~mil/mepo-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH mepo] Fix SDL thread leak

Details
Message ID
<20240709142148.517415-1-cnx@loang.net>
DKIM signature
pass
Download raw message
Patch: +1 -1
Threads created by SDL2 must be either waited for or detached.
---
 src/Mepo.zig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Mepo.zig b/src/Mepo.zig
index b8f9fe3bc4a9..0be4fd63dd70 100644
--- a/src/Mepo.zig
+++ b/src/Mepo.zig
@@ -469,7 +469,7 @@ pub fn init_video_and_sdl_stdin_loop(mepo: *@This(), enable_stdin_mepolang_repl:
            "Mepo_SDL_Thread",
            mepo,
        );
        _ = thread;
        sdl.SDL_DetachThread(thread);

        while (true) {
            const stdin = &std.io.getStdIn().reader();
-- 
2.45.1
Details
Message ID
<b63943c4-4e85-45e8-8411-dbc915e99925@app.fastmail.com>
In-Reply-To
<20240709142148.517415-1-cnx@loang.net> (view parent)
DKIM signature
pass
Download raw message
On Tue, Jul 9, 2024, at 10:21 AM, Nguyễn Gia Phong wrote:
> Threads created by SDL2 must be either waited for or detached.
> ---
>  src/Mepo.zig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/Mepo.zig b/src/Mepo.zig
> index b8f9fe3bc4a9..0be4fd63dd70 100644
> --- a/src/Mepo.zig
> +++ b/src/Mepo.zig
> @@ -469,7 +469,7 @@ pub fn init_video_and_sdl_stdin_loop(mepo: 
> *@This(), enable_stdin_mepolang_repl:
>              "Mepo_SDL_Thread",
>              mepo,
>          );
> -        _ = thread;
> +        sdl.SDL_DetachThread(thread);
> 
>          while (true) {
>              const stdin = &std.io.getStdIn().reader();
> -- 
> 2.45.1

Thanks for the catch on this by the way - applied.
Reply to thread Export thread (mbox)