Should be reentrant , because it is called on 指定的方法应是可重入的,这是因为
If it were , we would have to protect ourselves with (如果它是多线程的或可重入的,则必须用
It is acceptable because our test framework is not multithreaded or reentrant 这是可以接受的,因为我们的测试框架不是多线程的或可重入的。
Are not reentrant , because they use a static data structure that records which memory blocks are free 都不是可重入的,因为它们使用静态数据结构来记录哪些内存块是空闲的。
From the programmer perspective , these two are separate concepts : a function can be reentrant , thread - safe , both , or neither 在程序员看来,这是两个独立的概念:函数可以是可重入的,是线程安全的,或者二者皆是,或者二者皆非。