src/hotspot/share/logging/logOutputList.hpp
changeset 59215 fcd74557a9cc
parent 53244 9807daeb47c4
equal deleted inserted replaced
59214:e7df7c86eda1 59215:fcd74557a9cc
    95     LogOutputList*  _list;
    95     LogOutputList*  _list;
    96     Iterator(LogOutputList* list, LogOutputNode* start) : _current(start), _list(list) {
    96     Iterator(LogOutputList* list, LogOutputNode* start) : _current(start), _list(list) {
    97     }
    97     }
    98 
    98 
    99    public:
    99    public:
       
   100     Iterator(const Iterator &itr) : _current(itr._current), _list(itr._list){
       
   101       itr._list->increase_readers();
       
   102     }
       
   103 
       
   104     Iterator& operator=(const Iterator& rhs) {
       
   105       _current = rhs._current;
       
   106       if (_list != rhs._list) {
       
   107         rhs._list->increase_readers();
       
   108         _list->decrease_readers();
       
   109         _list = rhs._list;
       
   110       }
       
   111       return *this;
       
   112     }
       
   113 
   100     ~Iterator() {
   114     ~Iterator() {
   101       _list->decrease_readers();
   115       _list->decrease_readers();
   102     }
   116     }
   103 
   117 
   104     LogOutput* operator*() {
   118     LogOutput* operator*() {