-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error: cannot marshal fiber with c stackframe #1326
Comments
This is unfortunate behavior relating to closure capture. When you wrap the I don't know if this is easy to fix, but I can look into improving closure capture to not capture the parent fiber. Note that this also goes away if you use |
This allows uses the precise closure state capture when marshalling data between threads. This prevents accidental state capture when using ev/do-thread or similar with closures that reference the current state.
Another optimization would be to keep track of immutable closure captures (vs. mutable closure captures) and always detach them.
I'm going to mark this as fixed for now, but I still think there are some improvements to be made here. While the fixes above prevent this kind of error from happening in the case of this macro, we still could reduce variable capture from closures even more than we do already. |
Reporting for a friend who's too lazy to report this himself.
The snippet below results in
Removing the
do
makes this problem go away.The text was updated successfully, but these errors were encountered: