You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by Nicko Cadell <ni...@neoworks.com> on 2005/06/02 20:21:16 UTC

RE: ThreadContext question

It's the call to:

System.Threading.Thread.GetData(s_threadLocalSlot) 

On line 148 of ThreadContextProperties.cs that makes the
PropertiesDictionary actually held on a per managed thread basis.

Nicko

> -----Original Message-----
> From: mtraudt@optonline.net [mailto:mtraudt@optonline.net] 
> Sent: 27 May 2005 15:30
> To: log4net-dev@logging.apache.org
> Subject: ThreadContext question
> 
> The comments for ThreadContext indicate that it "is managed 
> on a per thread basis" however looking at the source code I 
> do not see how this works, since Thread.Context.s_properties 
> and ThreadContextProperties.s_threadLocalSlot are both static 
> data members.
> 
> What is the mechanism that causes the properties to be stored 
> per thread?
> 
> 
> 
> 
> 
>