reentrant code

reentrant code definition - computer

A programming routine that can be used by multiple programs simultaneously. It is used in operating systems and other system software as well as in multithreading, where concurrent events are taking place. It is written so that none of its code is modifiable (no values are changed) and it does not keep track of anything. The calling programs keep track of their own progress (variables, flags, etc.), thus one copy of the reentrant routine can be shared by any number of users or processes.

Conceptually, it is as if several people were each baking a cake from a single copy of a recipe on the wall. Everyone looks at the master recipe, but keeps track of their own progress by jotting down the step they are at on their own scratchpad so they can pick up where they left off. The master recipe is never disturbed.



Computer Desktop Encyclopedia THIS DEFINITION IS FOR PERSONAL USE ONLY
All other reproduction is strictly prohibited without permission from the publisher.
Copyright © 1981-2009 by Computer Language Company Inc. All rights reserved.

Comments
Improve this definition.
Do you have more to add? Share your linguistic knowledge or observation.
/Register to save your comments.