<commit_before>--- An expensive way to spawn a function. However, unlike spawn(), it executes on the same frame, and
-- unlike coroutines, does not obscure errors
-- @module fastSpawn

return function(func, ...)
	assert(type(func) == "function")

	local args = {...}
	local count = select("#", ...)

	local bindable = Instance.new("BindableEvent")
	bindable.Event:Connect(function()
		func(unpack(args, 1, count))
	end)

	bindable:Fire()
	bindable:Destroy()
end<commit_msg>Change fastSpawn.lua to handle deferred events<commit_after>--- An expensive way to spawn a function. However, unlike spawn(), it executes on the same frame, and
-- unlike coroutines, does not obscure errors
-- @module fastSpawn

return function(func, ...)
	assert(type(func) == "function")

	local args = table.pack(...)

	local bindable = Instance.new("BindableEvent")
	bindable.Event:Connect(function()
		bindable:Destroy()
		func(table.unpack(args))
	end)
	bindable:Fire()
end
{'fraction_non_alphanumeric': 0.1416579223504722, 'fraction_numerical': 0.001049317943336831, 'mean_word_length': 4.546511627906977, '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': '6628660', 'n_tokens_mistral': 304, 'n_tokens_neox': 291, 'n_words': 92}