Skip to content

Conversation

@CordlessCoder
Copy link
Contributor

No description provided.

@CordlessCoder
Copy link
Contributor Author

The second commit should improve performance quite a bit for multithreaded access to Static values, but still requires locking for dynamic closures.
If you think it's worth it, you may restrict Dynamic closures back to Fn instead of FnMut, which will no longer require a Mutex.

@callumio
Copy link
Owner

Other than that change, looks good - didn't know ArcSwap existed. If you don't want to implement the other methods, I'm happy to do it when I get the chance.

@CordlessCoder
Copy link
Contributor Author

CordlessCoder commented Oct 8, 2025

Took a while to get to it, but should be good now.
I might later try to relax the Clone bound to only apply if you use .set_static, but that might require some unsafe code.

@CordlessCoder
Copy link
Contributor Author

CordlessCoder commented Oct 9, 2025

Done, and I didn't need unsafe :)
Should be ready to merge.

@callumio
Copy link
Owner

Looks great, thanks!

@callumio callumio merged commit 4c13fac into callumio:main Oct 14, 2025
2 checks passed
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.

2 participants