reentrant
Học thuậtThân thiện
Definition
- Adjective:
- Pointing inward: Describing an angle that is greater than 180 degrees and thus points into the interior of a shape, rather than outward.
- In computing, capable of being safely entered again: Describing a section of code or a subroutine that can be invoked (re-entered) before a previous invocation has completed, often in the context of concurrent programming or interrupts.
Usage Examples
- Adjective (Geometry):
- The bay window created a reentrant angle in the wall of the house.
- A star shape typically has both salient and reentrant angles.
- Adjective (Computing):
- The function must be reentrant to be thread-safe.
- Writing reentrant code is essential for handling interrupts correctly.
Advanced Usage
- "reentrant polygon": A polygon that has at least one interior angle greater than 180 degrees, causing the boundary to "cave in" or indent.
- A crescent shape is an example of a reentrant polygon.
- "reentrant function": A function whose code can be safely executed concurrently by multiple threads or interrupted and then re-entered without causing data corruption.
- A reentrant function uses only local variables or carefully protects shared data.
Variants and Related Words
- Reentrancy (noun): The property of being reentrant.
- The reentrancy of the module was critical for the operating system's design.
- Non-reentrant (adjective): Not reentrant; describing code that cannot be safely re-entered.
- The legacy library contained non-reentrant functions, causing issues in the new multithreaded application.
Synonyms
- Concave (for angles/polygons): Curving inward. (Note: In geometry, "reentrant" is a specific type of concave angle in a polygon.)
- Thread-safe (for code, in some contexts): Designed to work correctly when accessed by multiple threads. (Note: All reentrant code is thread-safe for a single thread of re-entry, but not all thread-safe code is reentrant.)
Related Phrases
- Reentrant code: Code that is written to be reentrant.
- The developer reviewed the subroutine to ensure it was reentrant code.
- Reentrant lock: A synchronization primitive that allows the same thread to acquire the lock multiple times.
- Using a reentrant lock prevented the thread from deadlocking on itself.
Related Idioms
(This term is highly technical and is not commonly used in idiomatic expressions. Its usage is primarily confined to formal, technical contexts.)
Adjective
- (of angles) pointing inward
- a polygon with re-entrant angles