On Dec 6, 2004, at 12:38 PM, Jeff Lynn wrote:

So by not requesting another instance of logger, do you mean I should use global variable in the main thread dnd and "extern" in worker threads?


Are you sure you meant threads? Sounds like you might be intended to talk about child processes which is a totally different animal to which the previous discussion does not apply.


Threads are independent code paths in the same application. You can access all the variables that any other thread in the application can access (however bad things can happen if you aren't careful). Variables aren't "extern" for a thread, they are "extern" for a compilation unit.



Reply via email to