Concurrency
An Arbortext PE 应用程序 does not need to be thread-safe. An Arbortext PE 子进程 only handles one request at a time; therefore, it can only run one Arbortext PE 应用程序 at a time. However, an Arbortext PE 应用程序 does need to be safe for multi-processing, because the Arbortext PE Request Manager could ask two or more Arbortext PE 子进程 to run the same Arbortext PE 应用程序 at the same time.
For example, if an Arbortext PE 应用程序 attempts to write temporary data using an absolute path and file name (e:\tempdata\tempdatafile.txt), two instances of the Arbortext PE 应用程序 might run at the same time and overwrite each other’s file. If an Arbortext PE 应用程序 stores data to the Windows clipboard, two instances of the operation might run simultaneously and interfere with each other.
Every Arbortext PE 应用程序 needs to be serially reusable. An Arbortext PE 应用程序 should not attempt to maintain any state from one call to the next. The Arbortext PE Request Manager could ask a particular Arbortext PE 子进程 to execute any Arbortext PE 应用程序 repeatedly, so the Arbortext PE 应用程序 must not assume any prior state each time it is invoked. If a particular client submits several Arbortext PE 应用程序 requests to an Arbortext PE 服务器, the Arbortext PE Request Manager might allocate a different Arbortext PE 子进程 to serve each request. If the second request expects to find information left behind by the first request (for example, a value stored in a global variable), the application would only work if the Arbortext PE Request Manager happened to allocate the same Arbortext PE 子进程 to serve both requests.
这对您有帮助吗?