)]}'
{"oslo_utils/eventletutils.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9ca39f490f7f59bc3bb33ccd2e377acf5b8a701c","unresolved":false,"context_lines":[{"line_number":163,"context_line":"    isSet \u003d is_set"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def set(self):"},{"line_number":166,"context_line":"        if not self._set:"},{"line_number":167,"context_line":"            self._set \u003d True"},{"line_number":168,"context_line":"            self._event.send(True)"},{"line_number":169,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_3e1c0711","line":166,"range":{"start_line":166,"start_character":0,"end_line":166,"end_character":25},"updated":"2019-01-25 12:41:58.000000000","message":"Can this ever be called before \u0027clear\u0027? If so, this could fail, right? Ditto for the other functions here","commit_id":"c5b065c3e4ffe76a3e8eb3b9668a38fd2c16f3a5"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"ecc50f949b64592511e1633bea429ec61548f832","unresolved":false,"context_lines":[{"line_number":163,"context_line":"    isSet \u003d is_set"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def set(self):"},{"line_number":166,"context_line":"        if not self._set:"},{"line_number":167,"context_line":"            self._set \u003d True"},{"line_number":168,"context_line":"            self._event.send(True)"},{"line_number":169,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_8d5aa2f0","line":166,"range":{"start_line":166,"start_character":0,"end_line":166,"end_character":25},"in_reply_to":"9fdfeff1_3e1c0711","updated":"2019-01-25 23:32:52.000000000","message":"Not at the moment. clear() is called from the constructor.","commit_id":"c5b065c3e4ffe76a3e8eb3b9668a38fd2c16f3a5"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"2a3b514da44062d23ec1e042fb079dafff153ae8","unresolved":false,"context_lines":[{"line_number":163,"context_line":"    isSet \u003d is_set"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def set(self):"},{"line_number":166,"context_line":"        if not self._set:"},{"line_number":167,"context_line":"            self._set \u003d True"},{"line_number":168,"context_line":"            self._event.send(True)"},{"line_number":169,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_657933c3","line":166,"range":{"start_line":166,"start_character":0,"end_line":166,"end_character":25},"in_reply_to":"9fdfeff1_8d5aa2f0","updated":"2019-03-27 21:15:16.000000000","message":"Yeah, removing the self._set \u003d False from the constructor is just putting it back how it was before https://review.openstack.org/#/c/632758/1/oslo_utils/eventletutils.py","commit_id":"c5b065c3e4ffe76a3e8eb3b9668a38fd2c16f3a5"}],"oslo_utils/tests/test_eventletutils.py":[{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"fe87f21c88b5f6f63e8e267d18a11e31fbbb64de","unresolved":false,"context_lines":[{"line_number":212,"context_line":"            event.clear()"},{"line_number":213,"context_line":"            a.wait()"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        # Both threads are waiting on the event, but b will wake first because"},{"line_number":216,"context_line":"        # it was spawned first."},{"line_number":217,"context_line":"        b \u003d greenthread.spawn(thread_b)"},{"line_number":218,"context_line":"        a \u003d greenthread.spawn(thread_a)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_78c0717c","line":215,"updated":"2019-01-24 22:30:06.000000000","message":"Interesting. Does eventlet guarantee that threads wake up in order of creation?","commit_id":"626d444e724f6524973162185765ed1180c79d04"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"582051497c86e011a6e8f2e7e6d39bd9123178e4","unresolved":false,"context_lines":[{"line_number":212,"context_line":"            event.clear()"},{"line_number":213,"context_line":"            a.wait()"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        # Both threads are waiting on the event, but b will wake first because"},{"line_number":216,"context_line":"        # it was spawned first."},{"line_number":217,"context_line":"        b \u003d greenthread.spawn(thread_b)"},{"line_number":218,"context_line":"        a \u003d greenthread.spawn(thread_a)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_cf6d1405","line":215,"in_reply_to":"9fdfeff1_78c0717c","updated":"2019-01-25 01:56:20.000000000","message":"(There\u0027s actually a bug in this test, summarised on line 218 below, but that doesn\u0027t affect the results.)\n\nIf you\u0027re asking if that\u0027s documented somewhere, not that I\u0027ve seen. I ran the test plenty of times and it always woke them up in the same order, even on py27/py35 with PYTHONHASHSEED set to a different value each time.\n\nThat said, looking at the code it appears to be using iteration over a set to add timers that will wake up waiters (and those timers are actually executed in the order that they\u0027re scheduled, assuming that takes more than 1ns):\n\nhttps://github.com/eventlet/eventlet/blob/master/eventlet/event.py#L168\n\nso it\u0027s kind of a mystery why the order is fixed. It might be dependent on an implementation detail of Python itself - my pick is increasing memory addresses of the thread objects as they\u0027re created -\u003e increasing hash values -\u003e fixed order when there are only two values.\n\nI found a way to implement the test that\u0027s symmetrical between the threads, so I\u0027ll update the patch to do that.","commit_id":"626d444e724f6524973162185765ed1180c79d04"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"582051497c86e011a6e8f2e7e6d39bd9123178e4","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        # Both threads are waiting on the event, but b will wake first because"},{"line_number":216,"context_line":"        # it was spawned first."},{"line_number":217,"context_line":"        b \u003d greenthread.spawn(thread_b)"},{"line_number":218,"context_line":"        a \u003d greenthread.spawn(thread_a)"},{"line_number":219,"context_line":"        event.set()"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        with eventlet.timeout.Timeout(0.3):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_8fccec6a","line":218,"updated":"2019-01-25 01:56:20.000000000","message":"Missing a sleep() here to force the threads to actually start, otherwise we are not actually testing the behaviour of wait() inside thread_a.","commit_id":"626d444e724f6524973162185765ed1180c79d04"}]}
