Skip to content

Rework Megbot's multi-connection support #80

@moggers87

Description

@moggers87

Currently we have this horrible situation where each connection has its own thread, and each call to a plugin is spun off into a separate thread too.

This isn't too bad until you realise that each connection has its own copy of the plugin modules. In theory this was to allow module reloading, however it never worked and the syntax to fetch the local copy of a library is awful. Previously, certain libraries were added into the plugin's scope at load-time, but this made code readability even worse than it is now.

I propose that we make each connection its own process, allowing each connection to have its own copy of modules without resorting to any magic or unreadable syntax. If we wish to reintroduce code reloading at a later date, this will be significantly easier than before.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions