Say I have run a program that creates four .NET threads. Each thread takes about 45 minutes to run (on its own as a single threaded app).
Say I have access to a server with a quad-core processor. Can all four threads complete in 45 minutes?
I have done some reading from a book today, which says to take nothing for granted when it comes to multi-threading. The book seems to imply that in my example on one day could take 45 minutes because all four cores are used in parallel. However, on another day the program could take three hours (4*45) to complete.
Update The purpose of this question was to clarify a point I have read. My book implies that my program (that creates four threads and runs once a day) could use four cores on day 1 and one core on day x. I wanted to know if I have understood this correctly. I tested the program 10 times and each time all four cores were used. Therefore can I assume that all four cores will always be used?