Proposed change to the Interplugin communication API
#9
Interplugin communication has to be aware of thread locks. Otherwise we need to have a single global lock for lua execution to prevent the A is calling B and B is calling a deadlock. This would cause a number of problems with plugins calling methods that fire hooks. As for the OnPluginsLoaded hook what about if a plugin crash's, You're still left with an invalid reference and there is no threadsafe way of ensuring a live plugin in lua without knowing about locks.

You say that handles are no better than integrity checks, but they have several advantages in allowing the system to handle reloading plugins without having to unload everything, and automatic dependency resolution.

If we go for the OnPluginsLoaded hook, how do you suggest we deal with dependency resolution for destruction order, particularly as destruction can have more than two levels of clean up. The system has no way of telling if plugins have the different destruction dependencies.

If we go for xsofts suggestion and a global variable you've got a hackish version of handles without all the dependency resolution advantages.
Reply
Thanks given by:


Messages In This Thread
RE: Proposed change to the Interplugin communication API - by worktycho - 01-12-2014, 05:59 AM



Users browsing this thread: 1 Guest(s)