mariuszgromada / mariuszgromada/MathParser.org-mXparser

(C#) Ability to cancel a single thread with CancellationToken

Open
#206 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
955
Forks
158
PR merge metrics
No merged PRs in 30d

Description

mXparser.cancelCurrentCalculation() might be useful for simple use cases, but if you are running many calculations on multiple threads; it stops them all.

Please add a CancellationToken parameter to Expression.calculate() so that ONE calculation can be cancelled; not all of the currently-running ones.

Thanks.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the C# Expression.calculate() entry point and the existing mXparser.cancelCurrentCalculation() implementation. Trace how cancellation reaches a running calculation, then verify that a supplied CancellationToken stops only its associated calculation while other calculations continue.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.