)]}'
{"doc/source/api.rst":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"a35ab298fe3decdea726fea713541d3f852328d0","unresolved":false,"context_lines":[{"line_number":54,"context_line":"----------"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":".. autoclass:: futurist.RejectedSubmission"},{"line_number":57,"context_line":"    :members:"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"-------"},{"line_number":60,"context_line":"Waiters"}],"source_content_type":"text/x-rst","patch_set":6,"id":"3a50d1a3_f25c657f","line":57,"updated":"2015-07-30 07:47:58.000000000","message":"nit: no documentation seems to point to a new module rejection","commit_id":"7a7059da00005e9153846d59044b6f9d98398d55"}],"futurist/_futures.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1ccd192c20410c00efd98aa65d278c9bda371f3f","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"class RejectedSubmission(RuntimeError):"},{"line_number":40,"context_line":"    \"\"\"Exception raised when a submitted call is rejected (for some reason).\"\"\""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"# NOTE(harlowja): Allows for simpler access to this type..."}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_fdae7197","line":40,"updated":"2015-07-24 07:19:49.000000000","message":"Let\u0027s provide a ready-to-use function for check_and_reject:\n\n def reject_on_no_free_workers(executor, size):\n   if size \u003e\u003d executor._max_workers:\n      raise RejectedSubmission()","commit_id":"d9f03d16ca571eddbb03eebf5a10d2a3c99b8b4d"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1ccd192c20410c00efd98aa65d278c9bda371f3f","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    See: https://docs.python.org/dev/library/concurrent.futures.html"},{"line_number":114,"context_line":"    \"\"\""},{"line_number":115,"context_line":"    def __init__(self, max_workers\u003dNone, check_and_reject\u003dNone):"},{"line_number":116,"context_line":"        if max_workers is None:"},{"line_number":117,"context_line":"            max_workers \u003d _utils.get_optimal_thread_count()"},{"line_number":118,"context_line":"        super(ThreadPoolExecutor, self).__init__(max_workers\u003dmax_workers)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_9d940d45","line":115,"updated":"2015-07-24 07:19:49.000000000","message":"good time to introduce a docstring :) type of check_and_reject is not clear without reading code","commit_id":"d9f03d16ca571eddbb03eebf5a10d2a3c99b8b4d"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"d825900ccebcddc147c23a3a85e069eeb5117bda","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    See: https://docs.python.org/dev/library/concurrent.futures.html"},{"line_number":114,"context_line":"    \"\"\""},{"line_number":115,"context_line":"    def __init__(self, max_workers\u003dNone, check_and_reject\u003dNone):"},{"line_number":116,"context_line":"        if max_workers is None:"},{"line_number":117,"context_line":"            max_workers \u003d _utils.get_optimal_thread_count()"},{"line_number":118,"context_line":"        super(ThreadPoolExecutor, self).__init__(max_workers\u003dmax_workers)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_3ecb4874","line":115,"in_reply_to":"3a50d1a3_9d940d45","updated":"2015-07-24 22:23:04.000000000","message":"agreed","commit_id":"d9f03d16ca571eddbb03eebf5a10d2a3c99b8b4d"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1ccd192c20410c00efd98aa65d278c9bda371f3f","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        # and reject lock, and that it will block correctly if another"},{"line_number":124,"context_line":"        # submit call is done during that..."},{"line_number":125,"context_line":"        self._shutdown_lock \u003d threading.RLock()"},{"line_number":126,"context_line":"        self._check_and_reject \u003d check_and_reject or (lambda e, waiting: None)"},{"line_number":127,"context_line":"        self._gatherer \u003d _Gatherer("},{"line_number":128,"context_line":"            # Since our submit will use this gatherer we have to reference"},{"line_number":129,"context_line":"            # the parent submit, bound to this instance (which is what we"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_bd91c954","line":126,"updated":"2015-07-24 07:19:49.000000000","message":"what about accepting True for check_and_reject which will be replaced with reject_on_no_free_workers (see above)?","commit_id":"d9f03d16ca571eddbb03eebf5a10d2a3c99b8b4d"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"d825900ccebcddc147c23a3a85e069eeb5117bda","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        # and reject lock, and that it will block correctly if another"},{"line_number":124,"context_line":"        # submit call is done during that..."},{"line_number":125,"context_line":"        self._shutdown_lock \u003d threading.RLock()"},{"line_number":126,"context_line":"        self._check_and_reject \u003d check_and_reject or (lambda e, waiting: None)"},{"line_number":127,"context_line":"        self._gatherer \u003d _Gatherer("},{"line_number":128,"context_line":"            # Since our submit will use this gatherer we have to reference"},{"line_number":129,"context_line":"            # the parent submit, bound to this instance (which is what we"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_1ece8c83","line":126,"in_reply_to":"3a50d1a3_bd91c954","updated":"2015-07-24 22:23:04.000000000","message":"hmmmm, i didn\u0027t really want to make the policy that this is named \u0027reject_on_no_free_workers\u0027; that is just one of many different algorithms that could be used to reject new submissions, making it be a provided callback allows for creating arbitrary algorithms of which one could be \u0027 reject_on_no_free_workers\u0027","commit_id":"d9f03d16ca571eddbb03eebf5a10d2a3c99b8b4d"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1ccd192c20410c00efd98aa65d278c9bda371f3f","unresolved":false,"context_lines":[{"line_number":327,"context_line":"    It gathers statistics about the submissions executed for post-analysis..."},{"line_number":328,"context_line":"    \"\"\""},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"    def __init__(self, max_workers\u003d1000, check_and_reject\u003dNone):"},{"line_number":331,"context_line":"        if not _utils.EVENTLET_AVAILABLE:"},{"line_number":332,"context_line":"            raise RuntimeError(\u0027Eventlet is needed to use a green executor\u0027)"},{"line_number":333,"context_line":"        if max_workers \u003c\u003d 0:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_5d9e8564","line":330,"updated":"2015-07-24 07:19:49.000000000","message":"ditto about docstring and True value for check_and_reject","commit_id":"d9f03d16ca571eddbb03eebf5a10d2a3c99b8b4d"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c8489d8fc15724b2e5e7a63903c57b3e5f018b45","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                                 items in this executors backlog; the callback"},{"line_number":128,"context_line":"                                 should raise a :py:class:`.RejectedSubmission`"},{"line_number":129,"context_line":"                                 exception if it wants to have this submission"},{"line_number":130,"context_line":"                                 rejected."},{"line_number":131,"context_line":"        :type check_and_reject: callback"},{"line_number":132,"context_line":"        \"\"\""},{"line_number":133,"context_line":"        if max_workers is None:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a50d1a3_672b4bec","line":130,"updated":"2015-07-27 16:43:47.000000000","message":"1. I still think we could provide an example function for use here, especially since we don\u0027t expose max_workers as a public attribute. See my comment on patchset 1.\n\n2. There\u0027s no actual requirement to raise RejectedSubmission, not something else. Do you plan on introducing it later? Currently raising anything will do (and will be just propagated).\n\n3. What I also suggested on patchset 1 was that *in addition* to accepting callable, we could also accept True to designate a \"default\" function from #1. Though I think just providing such a function is enough.","commit_id":"84c07db84d52dfce20b14c1031aab800388bfc07"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"9ff10f1708f7c86b9ad3ac5e30042a9a551c4f70","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                                 items in this executors backlog; the callback"},{"line_number":128,"context_line":"                                 should raise a :py:class:`.RejectedSubmission`"},{"line_number":129,"context_line":"                                 exception if it wants to have this submission"},{"line_number":130,"context_line":"                                 rejected."},{"line_number":131,"context_line":"        :type check_and_reject: callback"},{"line_number":132,"context_line":"        \"\"\""},{"line_number":133,"context_line":"        if max_workers is None:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a50d1a3_f84251aa","line":130,"in_reply_to":"3a50d1a3_672b4bec","updated":"2015-07-28 23:35:19.000000000","message":"As for 1, yes I agree, a default function would be great.\n\nAs for 2, probably more of just a good practice, if people want to build there own set of \u0027check_and_reject\u0027 that use arbitrary routines, its probably easier for them to layer/compose them if they all throw RejectedSubmission; vs throwing random things...\n\nAs for 3, ok, I think a default strategy function is probably a good idea, or a built-in set of them...","commit_id":"84c07db84d52dfce20b14c1031aab800388bfc07"}]}
