Python Forum
Why does this hang the system up
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why does this hang the system up
#9
(Jun-08-2017, 04:46 PM)nilamo Wrote:
(Jun-08-2017, 01:02 PM)Able98 Wrote: Parallel(n_jobs=-1)(delayed(attempt)(w, pw) for pw in pwds)
What is Parallel?  What's delayed?
delayed looks like a decorator, but what does it do?

From that line, my guess is that you're creating a single spare process, which is passed a generator of attempted passwords.  Although hopefully that's not the case, since attempt uses global variables and writes to sys.stdout.

As I understand it, the Parallel does parallel processing and is part of the joblib library. I had hoped those here would know more than I.

If I understand you correctly, I will replace sys.stdout stuff with "print" and rename the attempt procedure.

My main suspect is the for loop which I would like to rewrite and have the attempt procedure set a flag for it to stop and exit. I do not see where the "raise PasswordFoundException call is needed at all and as I see it causing the problem. Please suggest a way to rewrite the for loop.
Reply


Messages In This Thread
Why does this hang the system up - by Able98 - Jun-07-2017, 07:59 PM
RE: Why does this hang the system up - by Ofnuts - Jun-07-2017, 08:25 PM
RE: Why does this hang the system up - by Able98 - Jun-08-2017, 12:39 AM
RE: Why does this hang the system up - by Ofnuts - Jun-08-2017, 08:01 AM
RE: Why does this hang the system up - by Able98 - Jun-08-2017, 11:44 AM
RE: Why does this hang the system up - by Ofnuts - Jun-08-2017, 12:38 PM
RE: Why does this hang the system up - by Able98 - Jun-08-2017, 01:02 PM
RE: Why does this hang the system up - by nilamo - Jun-08-2017, 04:46 PM
RE: Why does this hang the system up - by Able98 - Jun-08-2017, 07:07 PM
RE: Why does this hang the system up - by nilamo - Jun-09-2017, 12:16 AM
RE: Why does this hang the system up - by Able98 - Jun-09-2017, 08:29 AM
RE: Why does this hang the system up - by Able98 - Jun-09-2017, 09:03 PM
RE: Why does this hang the system up - by wavic - Jun-09-2017, 01:45 PM
RE: Why does this hang the system up - by Gil77 - Sep-01-2017, 11:40 AM
RE: Why does this hang the system up - by nilamo - Sep-02-2017, 09:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Difference between os.system("clear") and os.system("cls") chmsrohit 7 16,761 Jan-11-2021, 06:30 PM
Last Post: ykumar34
  multiprocess hang when certain number is used in the program esphi 7 3,272 Nov-06-2020, 03:49 PM
Last Post: esphi
Question Difference between Python's os.system and Perl's system command Agile741 13 6,967 Dec-02-2019, 04:41 PM
Last Post: Agile741
  Hang man game supermane 2 2,276 Aug-15-2018, 12:07 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020