Sha256: 45f2a7a9476bddddabc89e95a13eb6a9a6070b0b267a7c2890fbe70b47eee533
Contents?: true
Size: 500 Bytes
Versions: 13
Compression:
Stored size: 500 Bytes
Contents
# Copyright (c) 2021 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details. # frozen_string_literal: true module Contrast module Agent # Base class for threads that do async processing class WorkerThread def initialize @_thread = nil end def running? !!@_thread&.alive? end def stop! return unless running? Thread.kill(@_thread) @_thread = nil end end end end
Version data entries
13 entries across 13 versions & 1 rubygems