Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

In an async call pair you would rather have a BeginDoSomething & FinishDoSomething or PreDoingSomething & PostDoingSomething pair?

Cheers

share|improve this question

2 Answers 2

up vote 2 down vote accepted

If the method causes the async functionality to begin, then I would call it Begin....

If the method causes the async functionality to end, then I would call it End...

If the method should be run before the async functionality starts, then I might call it Pre...

If the method should be run after the async functionality ends, then I might call it Post...

The begin and end options seem to indicate that they cause things to happen with respect to the async function, like turning the key in the ignition, or turning it off again.

The pre and post options seem to indicate that they are detached from the actual async function they surround, like closing the car door before you put your foot on the accelerator, or putting on the handbrake before exiting the car.

share|improve this answer
    
That is more than less my understanding, thanks! –  stic Dec 13 '10 at 14:36

I prefer pre and post but those are naming conventions that are personal preference. There is not right or wrong.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.