Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: C++
Expertise: Intermediate
Jun 26, 2000

Re-entrant Functions

A function that can be safely called while it's already executing is said to be re-entrant. The C++ standard doesn't state whether the Standard Library's functions are re-entrant; this is an implementation-dependent feature. What's the use of calling a function while it's already executing? There are two occasions in which this scenario can happen: when the function is invoked by two or more distinct threads of the same program, or when executing a signal handler that raises the same signal once again. In either case, remember that calling a non re-entrant function while it's already executing is a bad idea — the program's behavior is undefined in this case.
Danny Kalev
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap