You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't want to add threads to the agent, the whole idea of the agent is that it should be light-weight, which means using no more than one thread.
That being said, some of the plugin (e.g. the file checking plugin and command runner) should work in async-io mode, but I'd like to do that without forcing every plugin to return a Future.
Further more, returning a Future means that plugins could send messages out of order or, even worse, a gather function could be called twice at the same time and we'd run in inconsistency errors due to the shared plugin state being modified by the parallel calls to gather. This would make plugin design significantly harder.
Part of me thinks that a "multi threaded" agent mode might work, where the agent just runs each plugin on it's separate thread, even for blocking plugins that should be enough.
I'd really avoid incorporating async-io or even futures into the plugins themselves for now, since tokio and futures seem to be very unstable, sometimes buggy and very poorly documented atm... I think it's too much of a burden to enforce using them for plugin authors.
Currently the agent basically locks on waiting for a plugin to return.
gather
should probably be a threaded/asynchronous event.This used to be in the roadmap, but no issue was created for it. Tagging 1.0, but it should be done significantly sooner than that.
The text was updated successfully, but these errors were encountered: