--[=[
	Starts the service bag and all services
]=]

function ServiceBag:Start()
	assert(self._serviceTypesToStart, "Already started")
	assert(not self._initializing, "Still initializing")

	while next(self._serviceTypesToStart) do
		local serviceType = table.remove(self._serviceTypesToStart)
		local service = assert(self._services[serviceType], "No service")

		if service.Start then
			local current
			task.spawn(function()
				current = coroutine.running()
				service:Start()
			end)

			assert(coroutine.status(current) == "dead", "Starting service yielded")
		end
	end

	self._serviceTypesToStart = nil
end
