Keeping track of threads when creating them recursively
Posted
by 66replica
on Stack Overflow
See other posts from Stack Overflow
or by 66replica
Published on 2010-05-04T23:31:00Z
Indexed on
2010/05/04
23:38 UTC
Read the original article
Hit count: 174
I'm currently working on some code for my Programming Languages course. I can't post the code but I'm permitted to talk about some high level concepts that I'm struggling with and receive input on them. Basically the code is a recursive DFS on a undirected graph that I'm supposed to convert to a concurrent program. My professor already specified that I should create my threads in the recursive DFS method and then join them in another method. Basically, I'm having trouble thinking of how I should keep track of the threads I'm creating so I can join all of them in the other method. I'm thinking an array of Threads but I'm unsure how to add each new thread to the array or even if that's the right direction.
© Stack Overflow or respective owner