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 did not return 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 did not return is now treated as an error:
fn foo(parent: fiber, ctx: ^int) {
a := make([]int, 10000)
fibercall(parent)
}
fn main() {
for i := 0; i < 10000; i++ {
ctx := new(int)
fibercall(fiberspawn(foo, ctx))
} // Runtime error: Cannot destroy a fiber that did not return
}
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 did not return 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 did not return 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: