summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2017-02-04 14:55:52 +0100
committerEugen Wissner <belka@caraus.de>2017-02-04 14:55:52 +0100
commit43c28b749d2fec76704cb0b6d37d5b2555bf0f2a (patch)
tree17b1082b4af30632085be5e78e95bc84902811d3
parent241767df13a798c2755736e904535681da490e3f (diff)
downloadtanya-43c28b749d2fec76704cb0b6d37d5b2555bf0f2a.tar.gz
Rename async.loop.Loop.done_ to done
Since there is no property with a conflicting name.
-rw-r--r--source/tanya/async/loop.d12
-rw-r--r--source/tanya/container/list.d2
-rw-r--r--source/tanya/container/queue.d2
-rw-r--r--source/tanya/container/vector.d2
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)
{