What kind of code can be called “re-entrant”?

前端 未结 9 1298
时光说笑
时光说笑 2020-12-24 02:34

Could someone tell me what code can be called \"re-entrant\" code?

I came across this word when reading some real time operating system. What disciplines must be st

9条回答
  •  无人及你
    2020-12-24 02:52

    Can another thread call the code while a first thread is in the middle of running it? If the code yields to a callback function, can the callback function itself call the code before the first runthrough has completed?

    If the code uses global vars that aren't locked down, or has its own static vars that it doesn't take special precautions with, any of those scenarios might break it.

提交回复
热议问题