]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/blockallocator.h
Avoid nested block reservations completely
[r2c2.git] / source / libr2c2 / blockallocator.h
index 2e3f3b28a7fb08d2ec809f35e2a75200651a1b8c..b401233593793a52743ef9bfb0967e4f27005197 100644 (file)
@@ -44,6 +44,7 @@ private:
        const Block *stop_at_block;
        bool reserving;
        bool advancing;
+       bool reserve_pending;
 
 public:
        BlockAllocator(Train &);
@@ -65,6 +66,8 @@ public:
        bool has_block(const Block &) const;
        bool is_block_current(const Block &) const;
 
+       void tick();
+
 private:
        void reserve_more();
        bool reserve_block(const BlockIter &);