Apple Enterprise - NeXTanswers Support Archive

Search NeXTanswers for:

EOF And Multithreaded Applications

Creation Date: June 11, 1998
EOF, threads

Q: Can I build a multi-threaded application using EOF?

A: EOF 2.2 and previous releases are not thread-safe and EOF cannot be used in traditional multithreaded applications. Even if all of an application's EOF and database calls are contained in a single thread of a multithreaded application, there may be unpredictable failures as a result of this limitation.

For most applications, you can avoid the problem by using multiple processes instead of multiple threads. For each function you would otherwise assign to a new thread, start a new instance of a separate application process instead. You can use Apple's Distributed Objects (DO) technology to allow these applications to communicate with each other. You will still be able to use multithreading in those processes that do not involve EOF.

OpenStep | Alliances | Training | Tech Support | Where to Buy