Subj : Re: a thread question To : comp.programming.threads From : Loic Domaigne Date : Fri May 13 2005 07:50 am >>For the situation we're speaking of, I prefer to use a global variable. > > > I can't imagine why you think that makes sense. > > Consider: > You would seriously argue that jobs 'j' and 'k' should be global? And > what? We should have two separate 'DispatchThreadToDoJob' functions, one for > job 'j' and one for job 'k'? Then what happens when some new piece of code > needs three jobs? We're not speaking about Thread's dispatcher or whatever, we're speaking here about a trivial condvar that needs to be signaled when a counter reaches 10... Unless I misread original's OP post? > It is absolutely the most common thing in the world for threads to share > non-global variables. Absolutely. Loic. .