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
This will allow for implementing most updates without a full-on server restart. I've seen this done with other similar Python projects, so it should be doable. I will look into the specifics of the implementation.
I swear to god I had this before. Maybe that was in the original StarryPy. I think I'd probably be the best fit to take a look at this, since the import machinery in PluginManager is pretty dark magic that I imagine not too many people would be comfortable tinkering with. I'll add it to my todo list for next week.
Wait, I had a look through some old branches I have on my local machine and I see why I didn't have it in 3k. The problem is that if there are active waiting coroutines at the moment you decide to reload, you can't really just dissassociate the existing instance. The problem is that if that coroutine never resolves, then that instance and all its references (think other plugins that are dependencies) never gets garbage collected and over time you'll just get incredible memory leaks.
So, I see a potential solution here. However, it would require eliminating all @asyncio.coroutine's from the plugin methods and implementing a new one that keeps track of all active plugin waiters. That way, if we call a reload, we can simply cancel those futures and the instances will be garbage collected. Seems like it'd be simple enough.
From @dopeghoti on August 6, 2016 15:45
This will allow for implementing most updates without a full-on server restart. I've seen this done with other similar Python projects, so it should be doable. I will look into the specifics of the implementation.
Copied from original issue: kharidiron#35
The text was updated successfully, but these errors were encountered: