Processing Concurrent Requests
Open Directory is multi-threaded, so plug-ins must be thread-safe. Plug-ins may be called multiple times by multiple applications. For example, the following requests may occur at the same time:
Application A makes a request that takes a long length of time to complete.
Application B makes a request that takes a short length of time to complete.
Application C makes a request that takes a medium length of time to complete.
Open Directory passes requests to the responsible plug-in as the requests come in and does not manage or serialize requests in any way. The plug-in is responsible for handling multiple concurrent requests in any way that it deems appropriate. It may choose to process Application A’s request first and Application B’s request last, process the requests serially, or use some other algorithm for determining the order in which to process concurrent requests.