Meaning – The term reentrant, refers to the attribute of a program or routine that allows the same copy of the program or routine to be used concurrently by two or more tasks.
In computing, a computer program or subroutine is called reentrant if multiple invocations can safely run concurrently on a single processor system, where a reentrant procedure can be interrupted in the middle of its execution and then safely be called again (“re-entered”) before its previous invocations complete execution.
This definition of reentrancy differs from that of thread safety in multi-threaded environments. A reentrant subroutine can achieve thread safety, but being reentrant alone might not be sufficient to be thread-safe in all situations.
Example of usage – “Reentrancy is not the same thing as idempotence, in which the function may be called more than once yet generate exactly the same output as if it had only been called once. Generally speaking, a function produces output data based on some input data (though both are optional, in general).”