summaryrefslogtreecommitdiff
path: root/doc/pl
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2019-05-12 09:25:45 +0200
committerSébastien Helleu <flashcode@flashtux.org>2019-05-12 09:25:45 +0200
commit1d3d0aa66e558dc8beb11929349db3754b6591a3 (patch)
tree94699b2ff4a507213b1d1e39018b0eef73dfb132 /doc/pl
parenta24817b141f1da76f56db9d034b18365effac37f (diff)
downloadweechat-1d3d0aa66e558dc8beb11929349db3754b6591a3.zip
doc: add chapter about WeeChat architecture in scripting guide
Diffstat (limited to 'doc/pl')
-rw-r--r--doc/pl/weechat_scripting.pl.adoc24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/pl/weechat_scripting.pl.adoc b/doc/pl/weechat_scripting.pl.adoc
index 76c7b8003..35a366db5 100644
--- a/doc/pl/weechat_scripting.pl.adoc
+++ b/doc/pl/weechat_scripting.pl.adoc
@@ -45,6 +45,30 @@ ale API jest takie same dla wszystkich języków.
[[scripts_in_weechat]]
== Skrypty w 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,Wykonuje proces w tle>>
+and the documentation on the function `hook_process` in the
+link:weechat_plugin_api.en.html#_hook_process[Opisu API wtyczek WeeChat] (Angielski).
+
[[languages_specificities]]
=== Specyfika języków