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
I am implementing a UI layer in an async framework, and I am unable to pass Stretch around (including using it as a member on the "self" structure) in async code because MeasureFunc is not Send/Sync.
I believe that the change may be as simple as changing the type of Boxed's value to sys::Box<dyn Fn(Size<Number>) -> Size<f32>> + Send + Sync)
This, unfortunately, could be a breaking change since this is a publicly exposed enum, so before jumping in to create a PR, I wanted to see what the opinion would be of attempting this change. I'm new enough to understanding how async works that I am not sure what the likelihood that these functions in most codebase wouldn't already be Send + Sync.
The text was updated successfully, but these errors were encountered:
I am implementing a UI layer in an async framework, and I am unable to pass Stretch around (including using it as a member on the "self" structure) in async code because MeasureFunc is not Send/Sync.
stretch/src/node.rs
Line 15 in 28e0047
I believe that the change may be as simple as changing the type of Boxed's value to
sys::Box<dyn Fn(Size<Number>) -> Size<f32>> + Send + Sync)
This, unfortunately, could be a breaking change since this is a publicly exposed enum, so before jumping in to create a PR, I wanted to see what the opinion would be of attempting this change. I'm new enough to understanding how async works that I am not sure what the likelihood that these functions in most codebase wouldn't already be Send + Sync.
The text was updated successfully, but these errors were encountered: