Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thread-safe EGraph struct #517

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

yihozhang
Copy link
Collaborator

We can make the EGraph implements the Send trait by substituting some of the components with thread-safe alternatives so this works:

    lazy_static! {
        pub static ref RT: Mutex<EGraph> = Mutex::new(EGraph::default());
    }

@yihozhang yihozhang requested a review from a team as a code owner January 31, 2025 00:36
@yihozhang yihozhang marked this pull request as draft January 31, 2025 00:37
@yihozhang yihozhang marked this pull request as ready for review January 31, 2025 00:47
Copy link

codspeed-hq bot commented Jan 31, 2025

CodSpeed Performance Report

Merging #517 will not alter performance

Comparing yihozhang-thread-safe-egraph (f073ccc) with main (71ecd99)

Summary

✅ 10 untouched benchmarks

@@ -217,16 +217,19 @@ fn map_fallible<T>(
.collect::<Result<_, _>>()
}

pub trait Macro<T> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

If you put Send + Sync here instead of just Send you don't need to repeat the bounds everywhere. I only needed them on SimpleMacro IIRC.

@Alex-Fischman
Copy link
Collaborator

Fixes #516.

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.

3 participants