Questions tagged [threadcontext]

45 questions
930
votes
5 answers

What is thread safe or non-thread safe in PHP?

I saw different binaries for PHP, like non-thread or thread safe? What does this mean? What is the difference between these packages?
O..
  • 10,925
  • 5
  • 20
  • 8
14
votes
5 answers

Windows: avoid pushing full x86 context on stack

I have implemented PARLANSE, a language under MS Windows that uses cactus stacks to implement parallel programs. The stack chunks are allocated on a per-function basis and are just the right size to handle local variables, expression temp…
Ira Baxter
  • 93,541
  • 22
  • 172
  • 341
12
votes
4 answers

ExecutionContext of Threads

What's the purpose of ExecutionContext.SuppressFlow();? In the following code what exactly gets suppressed? I've this test code... protected void btnSubmit_Click(object sender, EventArgs e) { Thread[] th = new Thread[100]; …
S M Kamran
  • 4,423
  • 7
  • 25
  • 35
8
votes
1 answer

What exactly is the thread context in C#?

I have a WCF service and it logs each call to the database. Later on, if an exception occurs, it is also logged to a separate database. I wanted a way to tie both of these logs together so we can see what might have caused the exception. To do this,…
NibblyPig
  • 51,118
  • 72
  • 200
  • 356
6
votes
1 answer

Why Thread.CurrentContext property and Thread.GetDomain() method?

It's not a question of major importance, but I was wondering why the Thread class exposes a property for getting the current Context (Thread.CurrentContext) and a method for getting the current AppDomain (Thread.GetDomain()). Knowing the hierarchy…
Ani
  • 2,636
  • 1
  • 21
  • 17
5
votes
2 answers

log4j2 isThreadContextMapInheritable property usage

I am trying to log events of a Java application to separate log files based on a key set to the ThreadContext. But my key is not reaching the child thread (created on MouseEvent) even after setting "log4j2.isThreadContextMapInheritable" to "true" in…
rahna
  • 51
  • 1
  • 2
5
votes
3 answers

Pass context to async Logger

I am trying to log raw request/response from a http client. I am following log4j2 configurations from these logging instructions. HttpAsync Client Dependency :- httpasyncclient (version 4.1.1) log4j2.xml
Potato_head
  • 336
  • 1
  • 4
  • 15
4
votes
1 answer

Alternative to 'ThreadContext' in log4j

I have been working on a project which uses log4j2, and in this project I use ThreadContext. Now I'm back to working with log4j (1), and it doesn't provide ThreadContext. Are there any good alternatives that I can ThreadContext with? Google searches…
user16655
  • 1,901
  • 6
  • 36
  • 60
4
votes
3 answers

Win 64bit GetThreadContext returns zeroe'd out registers, or 0x57 errorcode

I'm working on a Windows 7 64 bit machine (I have admin privs). I'm using Python 2.7 (64-bit) with PyDev ctypes for Eclipse to try and read the values of registers in all threads associated with a particular PID (tried both PIDs of processes running…
bl4ckmes4
  • 41
  • 1
  • 2
3
votes
2 answers

Microsoft.AspNetCore.Hosting.Internal.WebHost and log4net.LogicalThreadContext.Properties["requestid"]

I use netcore2.0 and I'm setting log4net.LogicalThreadContext property "requestid" with each request in my middleware class for logging purposes. log4net.LogicalThreadContext.Properties["requestid"] = Guid.NewGuid().ToString("N"); But…
ecif
  • 311
  • 2
  • 12
3
votes
3 answers

Is Log4net threadContext safe to use with WCF hosted in IIS?

I've read in a few places that the log4net threadContext isn't safe to use in an asp.net scenario. Here are a few articles: Log4Net, ThreadContext, and Global.asax http://piers7.blogspot.com/2005/12/log4net-context-problems-with-aspnet.html So my…
Paul Lemke
  • 5,494
  • 3
  • 47
  • 66
2
votes
1 answer

GetThreadContext returns EBP = 0

I'm trying to get the value of another process' EBP register on windows7 64 bits. for this I'm using GetThreadContext like this: static CONTEXT threadContext; memset(&threadContext, 0, sizeof(CONTEXT)); threadContext.ContextFlags =…
Idov
  • 5,006
  • 17
  • 69
  • 106
2
votes
1 answer

ThreadLocal/CoroutineContext bridge gaps

I want to maintain an object at the thread level or the coroutine level depending on the type of work the application is doing across different thread/coroutines. Is there a way to achieve this? let's say for simplicity's sake, I can write a Spring…
MozenRath
  • 9,652
  • 13
  • 61
  • 104
2
votes
1 answer

IoC and thread singletons

Several different IoC containers have support for Thread Singletons. How do the frameworks know when a thread goes out of scope? For instance: If I use the Thread Pool to do something, how can the container know when to create and dispose a…
jgauffin
  • 99,844
  • 45
  • 235
  • 372
2
votes
2 answers

Empty Threadcontext braces scenario handling in log4j2

I am trying to migrate to log4j2. In RollingFile Appender I am adding as below: [%d{MM/dd/yy HH:mm:ss:SSS z}] %-18.18t %-35.35c{1} %-5p (%F:%L) %m \t %x %n We know that %x is for printing…
user3207875
  • 215
  • 1
  • 3
  • 10
1
2 3