<commit_before>local skynet = require "skynet"
local c = require "skynet.c"

local mqueue = {}
local init_once
local thread_id
local message_queue = {}

skynet.register_protocol {
	name = "queue",
	id = 8,
	pack = skynet.pack,
	unpack = skynet.unpack,
	dispatch = function(session, from, ...)
		table.insert(message_queue, {session = session, addr = from, ... })
		if thread_id then
			skynet.wakeup(thread_id)
			thread_id = nil
		end<commit_msg>add comment for message queue<commit_after>local skynet = require "skynet"
local c = require "skynet.c"

local mqueue = {}
local init_once
local thread_id
local message_queue = {}

skynet.register_protocol {
	name = "queue",
	-- please read skynet.h for magic number 8
	id = 8,
	pack = skynet.pack,
	unpack = skynet.unpack,
	dispatch = function(session, from, ...)
		table.insert(message_queue, {session = session, addr = from, ... })
		if thread_id then
			skynet.wakeup(thread_id)
			thread_id = nil
		end
{'fraction_non_alphanumeric': 0.11844863731656184, 'fraction_numerical': 0.0031446540880503146, 'mean_word_length': 3.948186528497409, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6391300', 'n_tokens_mistral': 362, 'n_tokens_neox': 344, 'n_words': 90}