O
OpticTygre
Heheh...I've got lots of questions today.
If I have a loop that calls the same subroutine several times (that
subroutine may be processor and network intensive):
For i = 1 to 100
Call mySub(IPAddress(i))
Next
And inside mySub, I'm initializing a new network connection (SFTP if you
want to know). Does this loop automatically create new threads for each
subroutine that is called? I realize the loop will not wait for one sub to
finish before it calls the next. This particular loop will be finished
before the first subroutine is even finished. What is the difference
between calling something simple like this, or writing code to initiate new
threads for each sub I'm calling? Wouldn't each subroutine be working
separate from eachother already? What would be the benefit of threading
something like this?
-Jason
If I have a loop that calls the same subroutine several times (that
subroutine may be processor and network intensive):
For i = 1 to 100
Call mySub(IPAddress(i))
Next
And inside mySub, I'm initializing a new network connection (SFTP if you
want to know). Does this loop automatically create new threads for each
subroutine that is called? I realize the loop will not wait for one sub to
finish before it calls the next. This particular loop will be finished
before the first subroutine is even finished. What is the difference
between calling something simple like this, or writing code to initiate new
threads for each sub I'm calling? Wouldn't each subroutine be working
separate from eachother already? What would be the benefit of threading
something like this?
-Jason