Use only one queue for the async events

This commit is contained in:
2017-01-12 09:09:33 +01:00
parent ab930657b6
commit 4de42ca227
10 changed files with 22 additions and 33 deletions

View File

@ -6,7 +6,7 @@
* Copyright: Eugene Wissner 2016.
* License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/,
* Mozilla Public License, v. 2.0).
* Authors: $(LINK2 mailto:belka@caraus.de, Eugene Wissner)
* Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner)
*/
module tanya.async.event.epoll;
@ -159,7 +159,7 @@ class EpollLoop : SelectorLoop
}
else if (io.output.length)
{
swapPendings.enqueue(io);
pendings.enqueue(io);
}
}
else if (events[i].events & EPOLLOUT)

View File

@ -6,7 +6,7 @@
* Copyright: Eugene Wissner 2016.
* License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/,
* Mozilla Public License, v. 2.0).
* Authors: $(LINK2 mailto:belka@caraus.de, Eugene Wissner)
* Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner)
*/
module tanya.async.event.iocp;
@ -222,7 +222,7 @@ class IOCPLoop : Loop
reify(io, EventMask(Event.none), EventMask(Event.read, Event.write));
swapPendings.enqueue(connection);
pendings.enqueue(connection);
listener.beginAccept(overlapped);
break;
case OverlappedSocketEvent.read:
@ -264,7 +264,7 @@ class IOCPLoop : Loop
{
transport.socket.beginReceive(io.output[], overlapped);
}
swapPendings.enqueue(io);
pendings.enqueue(io);
}
break;
case OverlappedSocketEvent.write:

View File

@ -271,7 +271,7 @@ class KqueueLoop : SelectorLoop
}
else if (io.output.length)
{
swapPendings.enqueue(io);
pendings.enqueue(io);
}
}
else if (events[i].filter == EVFILT_WRITE)

View File

@ -6,7 +6,7 @@
* Copyright: Eugene Wissner 2016.
* License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/,
* Mozilla Public License, v. 2.0).
* Authors: $(LINK2 mailto:belka@caraus.de, Eugene Wissner)
* Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner)
*/
module tanya.async.event.selector;
@ -253,7 +253,7 @@ abstract class SelectorLoop : Loop
if (!connection.incoming.empty)
{
swapPendings.enqueue(connection);
pendings.enqueue(connection);
}
}
}