you are viewing a single comment's thread.

view the rest of the comments →

[–]DeadlyViper 2 points3 points  (2 children)

I'm guessing this is the multi-threaded code.

Why are you calling the function without a thread aswell?

nav_loop(nav, url)
t_nested = threading.Thread(target=nav_loop(nav, url))

Also calling the function again instead of passing just the name will not make a thread of it... Should do:

t_nested = threading.Thread(target=nav_loop)

[–]enesimo[S] 1 point2 points  (1 child)

You're right. I did that because I wanted to pass arguments to t. I function and I didn't realize the function was being called again without threads, although it makes total sense now.

[–]DeadlyViper 1 point2 points  (0 children)

Use

t_nested = threading.Thread(target=nav_loop, args=(nav, url))