Routine Invocation
Routine Invocation¶
When a sequence of statements forms a conceptual unit about which it is possible and useful to think and reason in isolation it is convenient to encapsulate the sequence in a named routine (procedure) and to replace it with a procedure call in the original code.
Unlike a goto statement, routine invocation guarantees that the flow of control will eventually return to the point from which the routine was called (the procedure call).
Code logic¶
- MySQL Stored procedure
- Rake Tasks
- Background Jobs