Skip to content

Can't kill thread when thread is sleeping #43

Description

@skrbhn
class TimerDemo
  def start()
    @timer = Thread.new() {
      Thread.sleep 10
    }
  end

  def stop()
    @timer.kill()
  end
end

th = TimerDemo.new()
th.start()
Thread.sleep 7
th.stop()
while true
  Thread.sleep 7
end

After 10 seconds, it's closed by a unkown error which is from os.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions