Add shared overload of the EventDriver.events property.

This allows accessing the shared "trigger" method from a shared event driver.
This commit is contained in:
Sönke Ludwig 2017-01-13 10:20:51 +01:00
parent a3ca0965cf
commit aa7b2946f3
4 changed files with 4 additions and 0 deletions

View file

@ -10,6 +10,7 @@ interface EventDriver {
@property EventDriverCore core();
@property EventDriverTimers timers();
@property EventDriverEvents events();
@property shared(EventDriverEvents) events() shared;
@property EventDriverSignals signals();
@property EventDriverSockets sockets();
@property EventDriverDNS dns();

View file

@ -39,6 +39,7 @@ final class LibasyncEventDriver : EventDriver {
override @property LibasyncEventDriverDNS dns() { return m_dns; }
override @property LibasyncEventDriverTimers timers() { return m_timers; }
override @property LibasyncEventDriverEvents events() { return m_events; }
override @property shared(LibasyncEventDriverEvents) events() shared { return m_events; }
override @property LibasyncEventDriverSignals signals() { return m_signals; }
override @property LibasyncEventDriverWatchers watchers() { return m_watchers; }

View file

@ -91,6 +91,7 @@ final class PosixEventDriver(Loop : PosixEventLoop) : EventDriver {
// force overriding these in the (final) sub classes to avoid virtual calls
final override @property CoreDriver core() { return m_core; }
final override @property EventsDriver events() { return m_events; }
final override @property shared(EventsDriver) events() shared { return m_events; }
final override @property SignalsDriver signals() { return m_signals; }
final override @property TimerDriver timers() { return m_timers; }
final override @property SocketsDriver sockets() { return m_sockets; }

View file

@ -46,6 +46,7 @@ final class WinAPIEventDriver : EventDriver {
override @property WinAPIEventDriverDNS dns() { return m_dns; }
override @property WinAPIEventDriverTimers timers() { return m_timers; }
override @property WinAPIEventDriverEvents events() { return m_events; }
override @property shared(WinAPIEventDriverEvents) events() shared { return m_events; }
override @property WinAPIEventDriverSignals signals() { return m_signals; }
override @property WinAPIEventDriverWatchers watchers() { return m_watchers; }