Skip to content

Allow Plugins to utilize the CancellationToken from MainThread #233

@taooceros

Description

@taooceros

Discussion

Should we allow plugins to utilize the CancellationToken from Flow so that they can cancel their works properly when the query is updated.
This can be done by adding another method to IPlugin like QueryAsync with an default implementation pointing back to the Original Query method since c# 8 has added that feature so that we can expand the interface without potential compatibility issue.
Also, should we change Parallel.Foreach(plugins,=>) to Task.run for each plugin so that every plugin can query at the same time theoretically instead of waiting potential previous one due to potential query before it on work splitting for Parallel.Foreach. Or we can simply make all things async that change the result type of the potential new QueryAsync method to Task and make everything async.

Metadata

Metadata

Assignees

No one assigned

    Labels

    question/discussionFurther information is requested/discussion about a topic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions