naming conventions - Start -> end | stop | finish? -


i'm programming class , wondering pair of methods makes more sense describing process cycle:

start() -> stop() start() -> end() start() -> finish() 

basically these methods called before , after executing task.

what i'm asking in english (specifically in programming - language -) pair more common see?

sorry i'm not native speaker hear 1 people prefer.

if not clear enough please let me know fix or add more info.

thank in advance.

update:

the intention of methods call "user functions" before , after running task. task nothing special.

update 2

i didn't want language i'm using (to make general), i'm doing jquery plugin , want users of plugin add custom functions triggered before , after executes main task. hope makes clear. thinking in using answer not jquery php/java.

it depends.

  • if calling method abort task or stop early, call abort() or stop().

  • if calling method wait until task finishes, call waitfor().

  • if calling method perform final steps of task, call finish().

  • if calling method clean after task, call dispose() or cleanup().
    languages have standard name such method; use it.

  • update: if understand situation correctly, recommend onstarted() , oncompleted()


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

sql server - python to mssql encoding problem -

windows - Python Service Installation - "Could not find PythonClass entry" -