Gwyddion – Free SPM (AFM, SNOM/NSOM, STM, MFM, …) data analysis software


gwyddion — Base functions, library initialization


void gwy_type_init ()
gboolean gwy_threads_are_enabled ()
void gwy_threads_set_enabled ()


#include <libgwyddion/gwyddion.h>


Gwyddion classes has to be initialized before they can be safely deserialized. The function gwy_type_init() performs this initialization.


gwy_type_init ()

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.

gwy_threads_are_enabled ()

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

gwy_threads_set_enabled ()

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.



TRUE to enable multithread processing; FALSE to disable it.


Since: 2.53

Types and Values

See Also


© David Nečas and Petr Klapetek

Home Download News Features Screenshots Documentation Communicate Participate Resources Publications Applications Site Map

Valid XHTML 1.0 Valid CSS