Msf::Framework#threads?

MSP-11605

`Msf::Framework#threads?` returns whether `Msf::Framework#threads` was
ever initialized.  If `Msf::Framework#threads?` is true, then threads
need to be cleaned up, while if it is false then no threads need to be
cleaned up from the current framework.
bug/bundler_fix
Luke Imhoff 2014-11-13 14:21:35 -06:00
parent d9a25005a6
commit eb3ff769a9
No known key found for this signature in database
GPG Key ID: 5B1FB01FB33356F8
1 changed files with 10 additions and 0 deletions

View File

@ -218,6 +218,16 @@ class Framework
}
end
# Whether {#threads} has been initialized
#
# @return [true] if {#threads} has been initialized
# @return [false] otherwise
def threads?
synchronize {
instance_variable_defined? :@threads
}
end
protected
# @!attribute options