reentrantroutine

noun
UK /riːˈɛntrənt ruːˈtiːn/
US /riˈɛntrənt ruːˈtiːn/

A reentrant routine is a piece of computer code that can be used by many tasks at the same time without getting mixed up.

The operating system uses a reentrant routine so several programs can share the same printing code safely.


OTHER MEANINGS

2. A routine that can be interrupted and called again before its first run finishes.

The interrupt handler calls a reentrant routine that saves its state on the stack.

3. A subroutine that keeps no shared mutable data between calls.

Because it only uses local variables, the parser is a reentrant routine.

4. Code designed so multiple threads can execute it simultaneously.

Engineers marked the logging function as a reentrant routine to avoid race conditions.