Commit 33a22432 authored by Davis King's avatar Davis King

Made the pipe spec more clear.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403035
parent be38aef0
...@@ -165,8 +165,8 @@ namespace dlib ...@@ -165,8 +165,8 @@ namespace dlib
- if (size() == max_size()) then - if (size() == max_size()) then
- this call to enqueue() blocks until one of the following is the case: - this call to enqueue() blocks until one of the following is the case:
- there is room in the pipe for another item - there is room in the pipe for another item
- another thread is trying to dequeue from this pipe and we can pass - max_size() == 0 and another thread is trying to dequeue from this
our item object directly to that thread. pipe and we can pass our item object directly to that thread.
- someone calls disable() - someone calls disable()
- someone calls disable_enqueue() - someone calls disable_enqueue()
- else - else
...@@ -192,10 +192,10 @@ namespace dlib ...@@ -192,10 +192,10 @@ namespace dlib
/*! /*!
ensures ensures
- if (size() == max_size() && timeout > 0) then - if (size() == max_size() && timeout > 0) then
- this call to enqueue() blocks until one of the following is the case: - this call to enqueue_or_timeout() blocks until one of the following is the case:
- there is room in the pipe to add another item - there is room in the pipe to add another item
- another thread is trying to dequeue from this pipe and we can pass - max_size() == 0 and another thread is trying to dequeue from this pipe
our item object directly to that thread. and we can pass our item object directly to that thread.
- someone calls disable() - someone calls disable()
- someone calls disable_enqueue() - someone calls disable_enqueue()
- timeout milliseconds passes - timeout milliseconds passes
...@@ -223,8 +223,8 @@ namespace dlib ...@@ -223,8 +223,8 @@ namespace dlib
- if (size() == 0) then - if (size() == 0) then
- this call to dequeue() blocks until one of the following is the case: - this call to dequeue() blocks until one of the following is the case:
- there is something in the pipe we can dequeue - there is something in the pipe we can dequeue
- another thread is trying to enqueue an item onto this pipe - max_size() == 0 and another thread is trying to enqueue an item
and we can receive our item directly from that thread. onto this pipe and we can receive our item directly from that thread.
- someone calls disable() - someone calls disable()
- else - else
- this call does not block. - this call does not block.
...@@ -244,10 +244,10 @@ namespace dlib ...@@ -244,10 +244,10 @@ namespace dlib
/*! /*!
ensures ensures
- if (size() == 0 && timeout > 0) then - if (size() == 0 && timeout > 0) then
- this call to dequeue() blocks until one of the following is the case: - this call to dequeue_or_timeout() blocks until one of the following is the case:
- there is something in the pipe we can dequeue - there is something in the pipe we can dequeue
- another thread is trying to enqueue an item onto this pipe - max_size() == 0 and another thread is trying to enqueue an item onto this
and we can receive our item directly from that thread. pipe and we can receive our item directly from that thread.
- someone calls disable() - someone calls disable()
- timeout milliseconds passes - timeout milliseconds passes
- else - else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment