Skip to content

Conversation

@valadaptive
Copy link
Contributor

This might be a breaking change under semver rules--I don't know enough to be confident.

The get_noise functions don't actually need to borrow self mutably, and doing so can be somewhat limiting. For instance, I want to generate noise in parallel on multiple threads. That cannot be done with &mut self, as Rust treats that as an indication that that function mutates some shared state within the generator, which cannot be done safely on multiple threads.

However, since these functions don't actually mutate any internal state, they're perfectly safe to call from multiple threads at once--Rust just doesn't know it. That's what this PR fixes.

@Keavon
Copy link
Contributor

Keavon commented Dec 27, 2023

Ah, yes, good fix! I don't think this would be a breaking change because existing callers, I'm pretty sure, shouldn't have any trouble using their existing code.

@Auburn Auburn merged commit df34389 into Auburn:master Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants