Present Progressive or Simple Present for things that could be considered as a repeated action or as an action happening right now?
Solution 1:
Your example is an excellent one, because it absolutely can be written validly and indeed well in either the simple present or the present progressive.
As some services hold instances of the view, …
Perfectly good example of the simple present. It is normal, in the sort of cases we are talking about that the thing we are talking about happen, so simple present works fine.
As some services are holding instances of the view, …
Perfectly good example of the present progressive. At the point in time we are talking about, the thing we are talking about is happening, so the present progressive works fine.
The two express slightly different things, but both of those slightly different things are perfectly good descriptions of what the facts you wish to convey.
They aren't the only possibilities either:
As instances of the view are held by some services, …
As instances of the view are being held by some services, …
The simple and progressive present again, but this time in the passive voice to start with the instances rather than the services. We'd have no great reason for choosing this, and while I think the anti-passive myth is nonsense I'd want at least some actual reason to use it, but still, it remains yet two more examples of conveying exactly the same thing.
You do not have an issue of correctness in your dilemma. You don't even have an issue of convention, where there are two or more valid choices but one of them just happens to be more common among native speakers.
Both of your examples would sound perfectly natural to a native speaker.
You come down to three deciding factors:
- Do you particularly want to explain this piece of code in terms of what is the normal state during its execution, or in terms of what is going on during its execution.
- Does one or the other particularly well with other writing here.
- Which do you feel like using?
The first point is a matter of how the particular domain affects writing. Some would prefer to focus on current state when it comes to such writing, some on the sequence of events. Of these two views on how best to think about the operation software (both valid, but sometimes one is more effective than the other in certain cases), one leads more naturally to a given form than the other. The same happens with any other topic one might write about.
The second is just a matter of being consistent. If you've used the simple present heavily, you should probably stick to it when it will serve, and if you've used the progressive heavily, you should probably stick to it when it will serve. You don't have to, because after all there are times when one has to switch tenses so there is no rule that we can't, it just tends to read more sensibly most of the time (and make the risk of truly inappropriate tense changes less likely).
And the thirds is that all else being equal, and all else is equal here, it's perfectly fine to just decide one feels better to you than the other.
In this case they really are equally fine.
Solution 2:
As a software engineer myself, I'd definitely use "are holding." When I write a comment in code, I'm concerned with what is happening as the program runs, not with what happens when the program runs (note the tenses and conjunctions I've used).