Octave.NET
Octave.NET copied to clipboard
Add task based execute
Summary
Adds task-based Octave command execution with cancellation support and hardens process lifecycle handling around errors, timeouts, disposal, and pooled worker reuse.
Changes
- Added
OctaveContext.Execute(string command, CancellationToken cancellationToken)for asynchronous command execution. - Serialized sync and async execution per context to avoid overlapping writes to the same Octave REPL process.
- Added cancellation and disposal handling that interrupts or retires active workers instead of returning unsafe processes to the pool.
- Improved command completion detection by waiting for both stdout and stderr command-boundary markers.
- Retired workers after stderr errors, timeouts, process exits, cancellation, and failed writes so later executions can recover with a fresh process.
- Reworked
ObjectPool<T>to useSemaphoreSlimfor concurrency limits and added explicit disposal/idle reclaim cleanup. - Updated tests for async execution, cancellation, disposal races, process
dotnet build src/Octave.NET/Octave.NET.csproj -f netstandard2.0 --no-restoredotnet build src/Octave.NET/Octave.NET.csproj -f net10.0 --no-restore