hunk.code_window:         logger.info("Starting connector server at {}:{}".format(address, port))
           logger.info("")
           thread = threading.Thread(name="server", target=self.serve_forever)
           thread.start()
       @override(InputReader)
       def next(self):
  
hunk.labels: keep keep add keep keep keep keep
hunk.after_edit:         thread.daemon = True
  
hunk.file_path: rllib/env/policy_server_input.py
hunk.type: add
file: // Copyright 2017 The Ray Authors.
  //
  // Licensed under the Apache License, Version 2.0 (the "License");
  // you may not use this file except in compliance with the License.
  // You may obtain a copy of the License at
  //
  //  http://www.apache.org/licenses/LICENSE-2.0
  //
  // Unless required by applicable law or agreed to in writing, software
  // distributed under the License is distributed on an "AS IS" BASIS,
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  // See the License for the specific language governing permissions and
  // limitations under the License.
  
  #ifndef RAY_CONFIG_H
  #define RAY_CONFIG_H
  
  #include <sstream>
  #include <unordered_map>
  
  #include "ray/util/logging.h"
  
  class RayConfig {
  /// -----------Include ray_config_def.h to define config items.----------------
  /// A helper macro that defines a config item.
  /// In particular, this generates a private field called `name_` and a public getter
  /// method called `name()` for a given config item.
  ///
  /// \param type Type of the config item.
  /// \param name Name of the config item.
  /// \param default_value Default value of the config item.
  #define RAY_CONFIG(type, name, default_value) \
   private:                                     \
    type name##_ = default_value;               \
                                                \
   public:                                      \
    inline type name() { return name##_; }
  
  #include "ray_config_def.h"
  /// -------------------------------------------------------------------------
  #undef RAY_CONFIG
  
   public:
    static RayConfig &instance() {
      static RayConfig config;
      return config;
    }
  
  // clang-format off
  /// -----------Include ray_config_def.h to set config items.-------------------
  /// A helper macro that helps to set a value to a config item.
  #define RAY_CONFIG(type, name, default_value) \
    if (pair.first == #name) {                  \
      std::istringstream stream(pair.second);   \
      stream >> name##_;                        \
      continue;                                 \
    }
  
    void initialize(const std::unordered_map<std::string, std::string> &config_map) {
      for (auto const &pair : config_map) {
        // We use a big chain of if else statements because C++ doesn't allow
        // switch statements on strings.
  #include "ray_config_def.h"
        RAY_LOG(FATAL) << "Received unexpected config parameter " << pair.first;
      }
    }
  /// ---------------------------------------------------------------------
  #undef RAY_CONFIG
  };
  // clang-format on
  
  #endif  // RAY_CONFIG_H
  