diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2019-05-12 09:25:45 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2019-05-12 09:25:45 +0200 |
commit | 1d3d0aa66e558dc8beb11929349db3754b6591a3 (patch) | |
tree | 94699b2ff4a507213b1d1e39018b0eef73dfb132 /doc/de | |
parent | a24817b141f1da76f56db9d034b18365effac37f (diff) | |
download | weechat-1d3d0aa66e558dc8beb11929349db3754b6591a3.zip |
doc: add chapter about WeeChat architecture in scripting guide
Diffstat (limited to 'doc/de')
-rw-r--r-- | doc/de/weechat_scripting.de.adoc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/de/weechat_scripting.de.adoc b/doc/de/weechat_scripting.de.adoc index 352277c37..13ef2f036 100644 --- a/doc/de/weechat_scripting.de.adoc +++ b/doc/de/weechat_scripting.de.adoc @@ -45,6 +45,30 @@ Allerdings ist die API für alle Skriptsprachen nahezu identisch. [[scripts_in_weechat]] == Skripten in WeeChat +// TRANSLATION MISSING +[[weechat_architecture]] +=== WeeChat architecture + +WeeChat is single-threaded, and this applies to scripts as well. + +The code of a script is executed: + +* when the script is loaded: typically a call to the + <<register_function,register function>> +* when a hook callback is called by WeeChat (see the chapter <<hooks,Hooks>>). + +When the code of a script is executed, WeeChat waits for the end of execution +before going on. Therefore the script must *NOT* do blocking operations like +network calls without using a dedicated API function like `hook_process`. + +[IMPORTANT] +A script must *NEVER* fork or create threads without using a dedicated API +function, this can crash WeeChat. + +If something must be run in background, the function `hook_process` can be used. +See example in the chapter <<hook_process,Hintergrundprozesse>> +and the documentation on the function `hook_process` in the +link:weechat_plugin_api.en.html#_hook_process[WeeChat plugin API reference] (Englisch). + [[languages_specificities]] === Besonderheiten der einzelnen Skriptsprachen |