开发者

Where can i find information about whats going behind the scene when creating thread? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplet开发者_运维技巧e, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

Where can i find information about whats going on behind the scene when Im creating a new thread ?

when i write

    Thread t = new Thread ()
....
t.start()....

i want to know what actually is going on... can you please redirect me ?


Although managed threads don't necessarily behave the same way as native threads, have a look at this article which covers the basic premise:

http://msdn.microsoft.com/en-us/library/windows/desktop/ms681917(v=vs.85).aspx

Specifically, when you create a thread the code will be running in the context below:

A thread is the entity within a process that can be scheduled for execution. All threads of a process share its virtual address space and system resources. In addition, each thread maintains exception handlers, a scheduling priority, thread local storage, a unique thread identifier, and a set of structures the system will use to save the thread context until it is scheduled. The thread context includes the thread's set of machine registers, the kernel stack, a thread environment block, and a user stack in the address space of the thread's process. Threads can also have their own security context, which can be used for impersonating clients.


Just so it's here as an answer, Jeffrey Richter's CLR via C# will probably† teach you stuff you don't know about CLR internals.

And here's Joe Duffy's Concurrent Programming on Windows

† in a statistical sense

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜