Functions API, easier single-thread use
- Added functions.php API for reactor use in procedural and functional code.
ReactoryFactory::select()
is now a static singleton method. Single-threaded code should never
use multiple event loops. This change is made to easeReactor
procurement and minimize bugs
from the existence of multipleReactor
instances in the same thread. It is NOT, however, an
excuse to forego dependency injection. Do not abuse the global nature of the event loop. Lazy
injection is fine, but laziness on your part as a programmer is not.
BC BREAKS:
- The
ReactorFactory::__invoke()
magic method has been removed. Any code relying on it must migrate
references toReactoryFactory::select()