rvql / gospline

A golang library for spline interpolation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add context cancelation

pjebs opened this issue · comments

commented

Some of these algorithms take a long time to calculate for massive amounts of data. It would be nice if you implemented context cancelation.

Could you please elaborate?
I'm not sure how context cancelation should be integrated into this lib, some example or a pull request would be nice.

commented

For each function that potentially takes a long time to return, add ctx context.Context as the first argument.

Then inside the function, check for if err := ctx.Err(); err != nil { return err }

commented

?