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
{{ message }}
Repository navigation
Commit 189a10f
Browse filesBrowse the repository at this point in the historyBrowse files
> \* Python coroutines are lazy like Rust futures — they don't execute until awaited or scheduled. However, Python still uses GC and has no ownership/lifetime concerns.
46
+
45
47
### No Built-In Runtime
46
48
47
49
```rust
@@ -71,13 +73,13 @@ var result = await task; // Just waits for completion
71
73
72
74
This is the single most important mental shift:
73
75
74
-
|| C# / JavaScript / Python | Go | Rust |
75
-
|---|---|---|---|
76
-
|**Creation**|`Task` starts executing immediately | Goroutine starts immediately |`Future` does nothing until polled |
77
-
|**Dropping**| Detached task continues running | Goroutine runs until return | Dropping a Future cancels it |
78
-
|**Runtime**| Built into the language/VM | Built into the binary (M:N scheduler) | You choose (tokio, smol, etc.) |
|**Cancellation**|`CancellationToken` (cooperative) |`context.Context` (cooperative) | Drop the future (immediate) |
76
+
|| C# / JavaScript | Python | Go | Rust |
77
+
|---|---|---|---|---|
78
+
|**Creation**|`Task` starts executing immediately |Coroutine is **lazy** — returns an object, doesn't run until awaited or scheduled |Goroutine starts immediately |`Future` does nothing until polled |
79
+
|**Dropping**| Detached task continues running |Unawaited coroutine is garbage-collected (with a warning) |Goroutine runs until return | Dropping a Future cancels it |
80
+
|**Runtime**| Built into the language/VM |`asyncio` event loop (must be explicitly started) |Built into the binary (M:N scheduler) | You choose (tokio, smol, etc.) |
0 commit comments