XWorkplace is quite heavily multi-threaded and offloads most tasks which are probable to take some time to several threads which are always running in the background. Those threads create object windows and are thus normally blocked, unless there's real work to do. XWorkplace uses mutex semaphores all over the place to serialize access to global data structures.

With V0.9.0, all the thread code has been put into a new file, called src\filesys\xthreads.c.

All threads are created in krnInitializeXWorkplace (src\shared\kernel.c), which gets called from M_XFldObject::wpclsInitData, which is probably the first SOM method called when the WPS is initializing at startup.

All threads have some fntXXXThread function, which is the main thread function passed to the thr* functions in /helpers/threads.c when the thread is created. These in turn create an object window using some fnwpXXXObject function as their window procedure.

For each thread, we then have some krnPostXXXMsg function which posts a message to the corresponding object window. All messages are defined and explained in include\filesys\xthreads.h.

The following additional threads are available: