Top | ![]() |
![]() |
![]() |
![]() |
Gwyddion classes has to be initialized before they can be safely
deserialized. The function gwy_type_init()
performs this initialization.
void
gwy_type_init (void
);
Makes libgwyddion types safe for deserialization and performs other initialization. You have to call this function from the main thread before using objects from libgwyddion.
It calls g_type_init()
first to make sure GLib object system is initialized.
It is safe to call this function more than once, subsequent calls are no-op.
gboolean
gwy_threads_are_enabled (void
);
Obtains the state of internal multithread processing.
TRUE
if multithread processing is enabled; FALSE
otherwise (this
includes the case of Gwyddion not built with multithread processing
support at all).
Since: 2.53
void
gwy_threads_set_enabled (gboolean setting
);
Enables or disables internal multithread processing.
Multithread processing, if enabled, is utilised internally and transparently in Gwyddion functions. No threads are exposed in the API.
The default setting is FALSE
. If you run programs or scripts based on
Gwyddion in parallel, for instance in a simulation or batch data processing,
it is recommended to keep multithread processing disabled. For GUI programs
(like Gwyddion itself) or tasks run serially, it can be useful to enable it.
If Gwyddion was not built with multithread processing support, enabling
threads does not do anything and gwy_threads_are_enabled()
will continue to
return FALSE
.
Since: 2.53