Skip to content

Commit 1b46565

Browse files
committed
Add some documentation
1 parent 190acc4 commit 1b46565

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

arangod/Graph/Queues/BatchedFifoQueue.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,24 @@
3535
namespace arangodb {
3636
namespace graph {
3737

38+
/**
39+
Queue-like queue (first-in-first-out) that can contain either steps (which
40+
correspond to vertex-edges) or expansions that promise more vertex-edges for
41+
a specific vertex.
42+
43+
Internally, this queue includes two queues, the main queue (_queue) that
44+
includes steps and the continuation queue (_continuationQueue) that includes
45+
the expansions. Basically, we want a queue that can include either a step or
46+
an expansion, but if an expansion is epxanded, we need to add steps in the
47+
middle of the queue (where the responsible expansion sits). This is
48+
complicated to do, therefore _queue includes all steps that are ready and
49+
they are popped first. If _queue is empty when popping, an expansion from the
50+
_continuationQueue is popped. From code that uses this BatchedFifoQueue this
51+
expansion can then be expanded and these expansion steps can the be pushed
52+
again to the queue (where they directly go into the main _queue).
53+
54+
TODO: write about how to get rid of an expansion
55+
*/
3856
template<class StepType>
3957
class BatchedFifoQueue {
4058
public:

0 commit comments

Comments
 (0)