Skip to content

use thread safe collection in RoundRobinFormulaGenerator#1239

Merged
egonw merged 1 commit intocdk:mainfrom
SteffenHeu:concurrent-formula-decompose
Oct 26, 2025
Merged

use thread safe collection in RoundRobinFormulaGenerator#1239
egonw merged 1 commit intocdk:mainfrom
SteffenHeu:concurrent-formula-decompose

Conversation

@SteffenHeu
Copy link
Copy Markdown
Contributor

@SteffenHeu SteffenHeu commented Oct 25, 2025

Hi all,

thanks for providing the CDK first of all 👍.

We use it in mzmine to generate molecular formulas and noticed, that we cannot parallelise the generation for the RoundRobinFormulaGenerator (line 170). The issue was that the cache in there was not thread safe and iteration caused a concurrent modification exception.

I replaced the current cache with a thread-safe ConcurrentLinkedQueque.

@egonw egonw merged commit 03cb25f into cdk:main Oct 26, 2025
7 of 8 checks passed
@SteffenHeu SteffenHeu deleted the concurrent-formula-decompose branch October 27, 2025 07:33
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