Commit f3cb498
committed
Finally fix Linux stream crashes and logging test timing
- Guard the InputStream/OutputStream throwing helpers against Foundation’s unimplemented streamError on Linux so CC_read/CC_write no longer trigger illegal instructions when the underlying handle is closed; fall back to .unknown while keeping richer errors on Apple platforms.
- Make the async sleep helper in Logging.testRollingTimestamp2 @sendable and switch it to Thread.sleep on Linux so detached threads actually delay, restoring deterministic timestamp gaps and removing the Swift 6 warning.
It looks like there is an open, but (unsurprisingly) abandoned bug entry at swiftlang/swift-corelibs-foundation#39561 parent ce5c0ab commit f3cb498
File tree
3 files changed
+17
-3
lines changed- Sources/CornucopiaCore/Extensions
- InputStream
- OutputStream
- Tests/CornucopiaCoreTests/Logging
3 files changed
+17
-3
lines changedLines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
25 | 30 | | |
26 | 31 | | |
27 | 32 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
122 | 125 | | |
123 | 126 | | |
124 | 127 | | |
125 | 128 | | |
| 129 | + | |
126 | 130 | | |
127 | 131 | | |
128 | 132 | | |
| |||
0 commit comments