async-interop / event-loop

An event loop interface for interoperability in PHP.
MIT License
169 stars 9 forks source link

Lazy factory instantiation and save method call #65

Closed bwoebi closed 8 years ago

bwoebi commented 8 years ago

The loop code is quite hot, thus it should not be too bad to save a method call here. self::get() is still called to eventually create&assign the default driver, if it is missing.

Also instantiate the factories lazily. This additionally avoids having an unused default loop object in many cases.