prosody: Expose main thread on the 'prosody' global
authorKim Alvefur <zash@zash.se>
Wed, 06 Oct 2021 14:49:26 +0200
changeset 12300 49ebac8a5260
parent 12299 e22afa09ebf2
child 12301 249eb306f668
prosody: Expose main thread on the 'prosody' global To allow running things in it.
.luacheckrc
prosody
--- a/.luacheckrc	Tue Jan 01 16:43:49 2019 +0100
+++ b/.luacheckrc	Wed Oct 06 14:49:26 2021 +0200
@@ -12,6 +12,9 @@
 files["prosody"] = {
 	allow_defined_top = true;
 	module = true;
+	globals = {
+		"prosody";
+	}
 }
 files["prosodyctl"] = {
 	allow_defined_top = true;
--- a/prosody	Tue Jan 01 16:43:49 2019 +0100
+++ b/prosody	Wed Oct 06 14:49:26 2021 +0200
@@ -54,6 +54,8 @@
 
 thread:run(startup.prosody);
 
+prosody.main_thread = thread;
+
 local function loop()
 	-- Error handler for errors that make it this far
 	local function catch_uncaught_error(err)