There is no need anymore to pass max_pending_results to the main_loop function in scanner.py.
max_pending_results
main_loop
scanner.py