Skip to content

Conversation

@elbaro
Copy link

@elbaro elbaro commented Jan 22, 2026

This PR changes

    objective: Rc<RefCell<Row>>,
    artificial: Option<Rc<RefCell<Row>>>,

to

    objective: Row,
    artificial: Option<Row>,

I am a little unconfident of this PR because the conversion was too straightforward.

Replace Rc<RefCell<Row>> with direct Row storage.

BREAKING CHANGE: Solver is now Send + Sync.
@orhun
Copy link
Member

orhun commented Jan 22, 2026

Hey, thanks for the PR.
The changes look okay but I haven't checked the details (performance impact, safety, etc.)
I'm just wondering about your use case for this :)

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 57.14286% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.26%. Comparing base (4aad6db) to head (4ca11cd).

Files with missing lines Patch % Lines
src/solver.rs 57.14% 9 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #50   +/-   ##
=======================================
  Coverage   76.26%   76.26%           
=======================================
  Files           8        8           
  Lines        1230     1230           
=======================================
  Hits          938      938           
  Misses        292      292           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@elbaro
Copy link
Author

elbaro commented Jan 24, 2026

I use Send + Sync for parallel rendering.

let widgets: Vec<Widget> = ..;
widgets.par_iter().map(|widget| widget.render(&solver)); // rayon

If Solver is Send + Sync, &solver can be passed to N threads and read in parallel.
Each widget has a different set of variables, so it's hard to prepare Vec<WidgetLayoutValues> in advance.

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