Skip to content

fix: race condition#42

Merged
Kikobeats merged 9 commits into
masterfrom
process
Oct 21, 2025
Merged

fix: race condition#42
Kikobeats merged 9 commits into
masterfrom
process

Conversation

@Kikobeats

@Kikobeats Kikobeats commented Oct 20, 2025

Copy link
Copy Markdown
Owner

When you don't await an async function, Node.js continues executing and exits immediately without waiting for it to complete.

The process exits before the finally block completes and sends the JSON to stdout, so the parent gets an empty string.

The fix is to wrap the entire template in an async IIFE and await the inner IIFE

@Kikobeats Kikobeats force-pushed the process branch 2 times, most recently from 1bedca8 to 056b948 Compare October 21, 2025 08:15
@Kikobeats Kikobeats changed the title fix: stdout write fix: race condition Oct 21, 2025
@Kikobeats Kikobeats merged commit 843d010 into master Oct 21, 2025
2 checks passed
@Kikobeats Kikobeats deleted the process branch October 21, 2025 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant