Hacker News new | past | comments | ask | show | jobs | submit login

Gain? You could pass different pointers to each worker function, giving you a way to partially shutdown your process, or to shutdown some workers first, and workers they depend on later.

Of course, if you don’t need that, it’s not a gain, and a global is fine.

Globals also are fine if you are resource constrained (e.g. if you have a few kilobytes of RAM or even less) Getting your code running in it may trump everything else.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: