Skip to content

Constrain NativeMethod to Send + Sync - #367

Merged
martin-hughes merged 2 commits into
rust-osdev:mainfrom
martin-hughes:constrain-native-method
Oct 8, 2026
Merged

martin-hughes merged 2 commits into
rust-osdev:mainfrom
martin-hughes:constrain-native-method

Conversation

@martin-hughes

Copy link
Copy Markdown
Contributor

This makes Object Send + Sync, and by extension WrappedObject (although gain_mut is still a potential footgun). If #361 is merged as well, then Interpreter becomes Send + Sync without needing an unsafe impl block.

I've manually tested that Interpreter indeed becomes Send + Sync when #361 is merged.

@martin-hughes

Copy link
Copy Markdown
Contributor Author

I'm reasonably happy that this is OK to merge, but I'll leave it here for a couple of days in case anyone spots any WTFs

This makes Object Send + Sync, and by extension WrappedObject (although
gain_mut is still a potential footgun). If rust-osdev#361 is merged as well, then
Interpreter becomes Send + Sync without needing an `unsafe impl` block.
@martin-hughes
martin-hughes force-pushed the constrain-native-method branch from f630d45 to c523787 Compare October 4, 2026 10:29
@martin-hughes
martin-hughes merged commit 7bf9e42 into rust-osdev:main Oct 8, 2026
6 checks passed
@martin-hughes
martin-hughes deleted the constrain-native-method branch October 8, 2026 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant