Skip to content

Can't kill thread when thread is sleeping #43

Open
@skrbhn

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.

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