0

After reading the following excerpts from C# documentation StackFrame Class, I still don't understand what the term "thread" means. What is a thread??? what does it mean in regards to a C# program in relevance to the call stack and stack frame(s)???

Provides information about a StackFrame, which represents a function call on the call stack for the current thread.

A StackFrame is created and pushed on the call stack for every function call made during the execution of a thread.

MVPyro
  • 43
  • 5
  • https://en.wikipedia.org/wiki/Thread_(computing) – tkausl Jul 05 '22 at 22:11
  • A thread is one process in task manager. Windows runs many processes simultaneously and a thread in this case is the process and any calls to methods from the process. – jdweng Jul 06 '22 at 00:07
  • @jdweng Huh? A Win32 process can and does normally contain many threads, each of which can access all the memory of the process. – Charlieface Jul 06 '22 at 00:17
  • What research have you done so far? Has Google thrown up anything you don't understand? A thread is a single sequence of instructions, that is scheduled onto the processor by the system thread scheduler. The thread has a stack of function calls that have happened and not yet finished, as and when a function returns its stack frame is removed from the stack. The stack frame contains details such as arguments passed to the function, local variables, and previous instruction pointer (in order to continue processing in the previous function). – Charlieface Jul 06 '22 at 00:22
  • @Charlieface : OP said "StackFrame, which represents a function call on the call stack for the current thread." The STACK FRAME is one thread. Child threads are not part of the STACK FRAME. – jdweng Jul 06 '22 at 00:34

0 Answers0