8000 The scheduler closes the process when any thread errors, even if there is still code alive. · Issue #162 · luau-lang/lute · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
The scheduler closes the process when any thread errors, even if there is still code alive. #162
Closed
@ffrostfall

Description

@ffrostfall

Take the following code:

local function loop()
	while true do
		task.defer()
		print("hi")
	end
end

local function otherloop()
	while true do
		task.defer()

		if math.random(1, 2) == 1 then
			error("oops")
		end
	end
end

coroutine.resume(coroutine.create(loop))
coroutine.resume(coroutine.create(otherloop))

This code, unintuitively, will exit the process. This is because when the scheduler encounters any error, even one not on the main thread, it will exit the process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    runtimeWork in the C++ runtime portion of the code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0