Skip to content

Make MeasureFunc Send and Sync#157

Merged
alice-i-cecile merged 3 commits intoDioxusLabs:mainfrom
alice-i-cecile:less-bad-measure-func
Jun 12, 2022
Merged

Make MeasureFunc Send and Sync#157
alice-i-cecile merged 3 commits intoDioxusLabs:mainfrom
alice-i-cecile:less-bad-measure-func

Conversation

@alice-i-cecile
Copy link
Copy Markdown
Collaborator

Objective

Fixes #146. This was much more straightforward than I was concerned it might be, we just needed to add a trait bound. This will unblock #27.

@alice-i-cecile alice-i-cecile added usability Make the library more comfortable to use breaking-change A change that breaks our public interface labels Jun 12, 2022
@alice-i-cecile alice-i-cecile changed the title Make MeasureFunc Send and Sync Make MeasureFunc Send and Sync Jun 12, 2022
@alice-i-cecile alice-i-cecile enabled auto-merge (squash) June 12, 2022 07:48
@alice-i-cecile alice-i-cecile merged commit 34d2258 into DioxusLabs:main Jun 12, 2022
Comment on lines +336 to +338
fn measure_func_is_send_and_sync() {
fn is_send_and_sync<T: Sync>() {}
is_send_and_sync::<MeasureFunc>();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is missing the T: Send bound.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good eye. I'll fix this ASAP.

jkelleyrtp pushed a commit that referenced this pull request Oct 10, 2022
* Make MeasureFunc Send and Sync

* Update RELEASE notes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change A change that breaks our public interface usability Make the library more comfortable to use

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NodeData and MeasureFunc are not thread-safe

2 participants