Changeset

12296:49ebac8a5260

prosody: Expose main thread on the 'prosody' global To allow running things in it.
author Kim Alvefur <zash@zash.se>
date Wed, 06 Oct 2021 14:49:26 +0200
parents 12295:e22afa09ebf2
children 12297:249eb306f668
files .luacheckrc prosody
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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)