[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Written by Jorrit Tyberghein.
The Crystal Space project as such is not thread-safe. So when using threads in combination with Crystal Space you have to be careful. However, several parts of Crystal Space are thread-safe to some degree. This is documented in this section. However, by default you must assume that some Crystal Space plugin or module is not thread-safe unless it is mentioned here. One important module which is not at all thread-safe yet is VFS. Since several other plugins depend on that this might be a problem.
SCF_CREATE_INSTANCE
and all the routines in iSCF
that have
to do with loaded classes are safe.
CS_LOAD_PLUGIN
,
CS_LOAD_PLUGIN_ALWAYS
, and CS_QUERY_PLUGIN_CLASS
are safe.
CS_QUERY_REGISTRY
are safe. The iObjectRegistryIterator
takes a copy of the data
over which it iterates so it will not even lock.
iDocument->Parse()
and iDocument->Write()
calls that use
iFile
and/or iVFS
.
iConsoleOutput->AutoUpdate(false)
).
Note that by default auto-updating is enabled!
iLoaderContext
is thread-safe. Please
note that the default iLoaderContext
is NOT thread-safe which makes
all loader plugins unsafe by default.
One important threaded section of CS is the threaded loader. In order to ensure that the threaded loader works correctly you must make sure that you use thread-safe versions of the following modules in CS:
iReporter
(the standard reporter is ok).
iReporterListener
(the standard reporter listener is ok).
iConsoleOutput
(simpcon and csconout are ok provided auto-updating is
disabled).
iLoaderContext
(the threaded loader provides a thread-safe version
of this one).
iDocumentSystem
(TinyXML, XMLRead, and BinaryXML are all ok).
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |