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
Fibers are unable to free the allocated heap if their functions have not returned in a regular way. This caused memory leaks, such as #16 and #255. To make the behavior more predictable and easier to analyze, any attempt to free a fiber variable whose function has not returned is now treated as an error:
fn main() {
for i := 0; i < 10000; i++ {
ctx := new(int)
resume(make(fiber, |ctx| {
a := make([]int, 10000)
resume()
}))
} // Runtime error: Cannot destroy a busy fiber
}
It is, however, very inconvenient for the user to care about how to terminate every fiber properly.
The text was updated successfully, but these errors were encountered:
Fibers are unable to free the allocated heap if their functions have not returned in a regular way. This caused memory leaks, such as #16 and #255. To make the behavior more predictable and easier to analyze, any attempt to free a fiber variable whose function has not returned is now treated as an error:
It is, however, very inconvenient for the user to care about how to terminate every fiber properly.
The text was updated successfully, but these errors were encountered: