Quote:
Does Parent method have any trace of child method,So that Parent method can be aware about the Child method execution has been Finish.
If the state object passed with the second argument does not include some means of telling what is going on, then unless you register a wait handle the "calling task" cannot tell what it happening with the "child task".
ThreadPool Class (System.Threading)[
^] - see teh "Remarks" section.
Quote:
What will be happen to Child Method if Parent Method Execution will finished before the Child Method execution. Does child method will show the output.
That's a difficult one: it depends on which thread initiates the child process. If it's the main thread - the one that executes from the
main
method as in your example - then when that thread ends, so will all the child tasks, regardless of their status and all memory and other resources will be recycled back to the OS.
If it isn't, then the child thread will continue.