From 43c28b749d2fec76704cb0b6d37d5b2555bf0f2a Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sat, 4 Feb 2017 14:55:52 +0100 Subject: [PATCH] Rename async.loop.Loop.done_ to done Since there is no property with a conflicting name. --- source/tanya/async/loop.d | 12 ++++++------ source/tanya/container/list.d | 2 ++ source/tanya/container/queue.d | 2 ++ source/tanya/container/vector.d | 2 ++ 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/source/tanya/async/loop.d b/source/tanya/async/loop.d index 13f86ca..a9ed586 100644 --- a/source/tanya/async/loop.d +++ b/source/tanya/async/loop.d @@ -130,6 +130,8 @@ alias EventMask = BitFlags!Event; */ abstract class Loop { + private bool done; + /// Pending watchers. protected Queue!Watcher pendings; @@ -167,7 +169,7 @@ abstract class Loop */ void run() @nogc { - done_ = false; + done = false; do { poll(); @@ -178,7 +180,7 @@ abstract class Loop w.invoke(); } } - while (!done_); + while (!done); } /** @@ -186,7 +188,7 @@ abstract class Loop */ void unloop() @safe pure nothrow @nogc { - done_ = true; + done = true; } /** @@ -202,6 +204,7 @@ abstract class Loop return; } watcher.active = true; + reify(watcher, EventMask(Event.none), EventMask(Event.accept)); } @@ -281,9 +284,6 @@ abstract class Loop */ abstract protected void poll() @nogc; - /// Whether the event loop should be stopped. - private bool done_; - /// Maximal block time. protected Duration blockTime_ = 1.dur!"minutes"; } diff --git a/source/tanya/container/list.d b/source/tanya/container/list.d index 73bf367..6405baa 100644 --- a/source/tanya/container/list.d +++ b/source/tanya/container/list.d @@ -322,6 +322,8 @@ struct SList(T) * * Params: * dg = $(D_KEYWORD foreach) body. + * + * Returns: The value returned from $(D_PARAM dg). */ int opApply(scope int delegate(ref size_t i, ref T) @nogc dg) { diff --git a/source/tanya/container/queue.d b/source/tanya/container/queue.d index f197687..6388013 100644 --- a/source/tanya/container/queue.d +++ b/source/tanya/container/queue.d @@ -190,6 +190,8 @@ struct Queue(T) * * Params: * dg = $(D_KEYWORD foreach) body. + * + * Returns: The value returned from $(D_PARAM dg). */ int opApply(scope int delegate(ref size_t i, ref T) @nogc dg) { diff --git a/source/tanya/container/vector.d b/source/tanya/container/vector.d index 94325e2..b38c0a4 100644 --- a/source/tanya/container/vector.d +++ b/source/tanya/container/vector.d @@ -1123,6 +1123,8 @@ struct Vector(T) * * Params: * dg = $(D_KEYWORD foreach) body. + * + * Returns: The value returned from $(D_PARAM dg). */ int opApply(scope int delegate(ref T) @nogc dg) {