You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .cursorrules
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,10 @@ Never swallow errors. When a function can fail, use `throws` to propagate descri
38
38
39
39
When invoking `swiftc`, pass `-module-cache-path` with a temporary directory to avoid conflicts when running in parallel (e.g., during `swift test`).
40
40
41
+
## Process Spawning
42
+
43
+
When spawning processes with redirected stdout/stderr pipes, read the pipes asynchronously before calling `waitUntilExit()`. On Windows, pipe buffers are limited and if they fill up, the child process will block waiting for the buffer to be drained. If the parent is blocked in `waitUntilExit()`, this creates a deadlock. Start reading on background queues immediately after launching the process.
44
+
41
45
## Naming Guidelines
42
46
43
47
Avoid putting type information in non-type names. Variable names should reflect the role of the value, if at all possible. If you can't find a better name for a variable than one that reflects its type, use a single letter name.
0 commit comments