Do not require client lock for read-only operations (#1730)
Do not require client lock for read-only operations (#1730)

In an effort to reduce the surface area of lock coordination, and thereby hopefully reduce lock contention, I think we can remove locking from the read-only KafkaClient methods: connected, is_disconnected, in_flight_request_count, and least_loaded_node . Given that the read data could change after the lock is released but before the caller uses it, the value of acquiring a lock here does not seem high to me.
scrapinghub/kafka-python,DataDog/kafka-python,wikimedia/operations-debs-python-kafka,dpkp/kafka-python,ohmu/kafka-python,ohmu/kafka-python,Yelp/kafka-python,Yelp/kafka-python,scrapinghub/kafka-python,dpkp/kafka-python,Aloomaio/kafka-python,Aloomaio/kafka-python,wikimedia/operations-debs-python-kafka,mumrah/kafka-python,mumrah/kafka-python