可重入 threadsafe reentrant nonreentrant

 

\threadsafe

The \threadsafe command includes a line in the documentation to indicate that the associated class or function is threadsafe and can be called simultaneously by multiple threads, even when separate invocations reference shared data.

The command must stand on its own line.

The documentation generated from this command will be similar to the what is generated for the \reentrant command. See the example above in the introduction.

See also \reentrant and \nonreentrant.

\reentrant

The \reentrant command indicates that the associated class or function can be called simultaneously by multiple threads, provided that each invocation references its own data. See the example above.

The command must stand on its own line.

See also \nonreentrant and \threadsafe.

\nonreentrant

The \nonreentrant command indicates that the associated class or function cannot be called by multiple threads. Nonreentrant is the default case.

The command must stand on its own line.

When a class is marked \reentrant or \threadsafe, functions in that class can be marked nonreentrant using this command in the \fn comment of the functions to be excluded.

See also \reentrant and \threadsafe.

 

posted @ 2021-02-10 17:00  papering  阅读(93)  评论(0编辑  收藏  举报