[OpenSER-Devel] dialog module global vars

Dan Pascu dan at ag-projects.com
Fri May 30 15:27:05 CEST 2008


On Friday 30 May 2008, Bogdan-Andrei Iancu wrote:
> Dan,
>
> context switching is something far, far away and so far was only a
> hypothetical discussion - nobody did the technical evaluation of such a
> change. So, I will not "buy" this argument.. :)

This is not an argument. The fact that you may not do it does not imply 
that you should be careless. Maintaining such simple rules helps in case 
you ever decide to do it, but it doesn't hurt if you don't. Moreover, 
reentrance is a requirement not only for that but for any form of 
parallel processing where a function may be called more than once.
Future changes in the code may trigger hard to track bugs where you don't 
expect them because at that point you won't remember that you need to fix 
this as well.

And in this particular case I hardly see any reason/benefit for/from a 
global variable.

-- 
Dan



More information about the Devel mailing list