repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/liquid-4.0.1/lib/liquid/tags/ifchanged.rb | _vendor/ruby/2.6.0/gems/liquid-4.0.1/lib/liquid/tags/ifchanged.rb | module Liquid
class Ifchanged < Block
def render(context)
context.stack do
output = super
if output != context.registers[:ifchanged]
context.registers[:ifchanged] = output
output
else
''.freeze
end
end
end
end
Template.register_ta... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/liquid-4.0.1/lib/liquid/tags/decrement.rb | _vendor/ruby/2.6.0/gems/liquid-4.0.1/lib/liquid/tags/decrement.rb | module Liquid
# decrement is used in a place where one needs to insert a counter
# into a template, and needs the counter to survive across
# multiple instantiations of the template.
# NOTE: decrement is a pre-decrement, --i,
# while increment is post: i++.
#
# (To achieve t... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/liquid-4.0.1/lib/liquid/tags/if.rb | _vendor/ruby/2.6.0/gems/liquid-4.0.1/lib/liquid/tags/if.rb | module Liquid
# If is the conditional block
#
# {% if user.admin %}
# Admin user!
# {% else %}
# Not admin user
# {% endif %}
#
# There are {% if count < 5 %} less {% else %} more {% endif %} items than you need.
#
class If < Block
Syntax = /(#{QuotedFragment})\s*([=!<>a-z_]+)... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/liquid-4.0.1/lib/liquid/tags/break.rb | _vendor/ruby/2.6.0/gems/liquid-4.0.1/lib/liquid/tags/break.rb | module Liquid
# Break tag to be used to break out of a for loop.
#
# == Basic Usage:
# {% for item in collection %}
# {% if item.condition %}
# {% break %}
# {% endif %}
# {% endfor %}
#
class Break < Tag
def interrupt
BreakInterrupt.new
end
end
Template.reg... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/jekyll-sass-converter-1.5.2/lib/jekyll-sass-converter.rb | _vendor/ruby/2.6.0/gems/jekyll-sass-converter-1.5.2/lib/jekyll-sass-converter.rb | # frozen_string_literal: true
require "jekyll-sass-converter/version"
require "jekyll/converters/scss"
require "jekyll/converters/sass"
module JekyllSassConverter
end
| ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/jekyll-sass-converter-1.5.2/lib/jekyll-sass-converter/version.rb | _vendor/ruby/2.6.0/gems/jekyll-sass-converter-1.5.2/lib/jekyll-sass-converter/version.rb | # frozen_string_literal: true
module JekyllSassConverter
VERSION = "1.5.2".freeze
end
| ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/jekyll-sass-converter-1.5.2/lib/jekyll/converters/sass.rb | _vendor/ruby/2.6.0/gems/jekyll-sass-converter-1.5.2/lib/jekyll/converters/sass.rb | # frozen_string_literal: true
require "sass"
require "jekyll/utils"
require "jekyll/converters/scss"
module Jekyll
module Converters
class Sass < Scss
safe true
priority :low
def matches(ext)
ext =~ %r!^\.sass$!i
end
def syntax
:sass
end
end
end
end
| ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/jekyll-sass-converter-1.5.2/lib/jekyll/converters/scss.rb | _vendor/ruby/2.6.0/gems/jekyll-sass-converter-1.5.2/lib/jekyll/converters/scss.rb | # frozen_string_literal: true
require "sass"
require "jekyll/utils"
module Jekyll
module Converters
class Scss < Converter
BYTE_ORDER_MARK = %r!^\xEF\xBB\xBF!
SyntaxError = Class.new(ArgumentError)
safe true
priority :low
ALLOWED_STYLES = %w(nested expanded compact compressed).fr... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent.rb | require 'concurrent/version'
require 'concurrent/constants'
require 'concurrent/errors'
require 'concurrent/configuration'
require 'concurrent/atomics'
require 'concurrent/executors'
require 'concurrent/synchronization'
require 'concurrent/atomic/atomic_reference'
require 'concurrent/agent'
require 'concurrent/atom'
... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/agent.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/agent.rb | require 'concurrent/configuration'
require 'concurrent/atomic/atomic_reference'
require 'concurrent/atomic/thread_local_var'
require 'concurrent/collection/copy_on_write_observer_set'
require 'concurrent/concern/observable'
require 'concurrent/synchronization'
module Concurrent
# `Agent` is inspired by Clojure's [a... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/tuple.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/tuple.rb | require 'concurrent/atomic/atomic_reference'
module Concurrent
# A fixed size array with volatile (synchronized, thread safe) getters/setters.
# Mixes in Ruby's `Enumerable` module for enhanced search, sort, and traversal.
#
# @example
# tuple = Concurrent::Tuple.new(16)
#
# tuple.set(0, :foo) ... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/version.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/version.rb | module Concurrent
VERSION = '1.0.5'
EDGE_VERSION = '0.3.1'
end
| ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/errors.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/errors.rb | module Concurrent
Error = Class.new(StandardError)
# Raised when errors occur during configuration.
ConfigurationError = Class.new(Error)
# Raised when an asynchronous operation is cancelled before execution.
CancelledOperationError = Class.new(Error)
# Raised when a lifecycle method (such as `stop`) is... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/options.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/options.rb | require 'concurrent/configuration'
module Concurrent
# @!visibility private
module Options
# Get the requested `Executor` based on the values set in the options hash.
#
# @param [Hash] opts the options defining the requested executor
# @option opts [Executor] :executor when set use the given `Exe... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/maybe.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/maybe.rb | require 'concurrent/synchronization'
module Concurrent
# A `Maybe` encapsulates an optional value. A `Maybe` either contains a value
# of (represented as `Just`), or it is empty (represented as `Nothing`). Using
# `Maybe` is a good way to deal with errors or exceptional cases without
# resorting to drastic me... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/future.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/future.rb | require 'thread'
require 'concurrent/constants'
require 'concurrent/errors'
require 'concurrent/ivar'
require 'concurrent/executor/safe_task_executor'
require 'concurrent/options'
module Concurrent
# {include:file:doc/future.md}
#
# @!macro copy_options
#
# @see http://ruby-doc.org/stdlib-2.1.1/libdoc/obse... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/array.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/array.rb | require 'concurrent/utility/engine'
require 'concurrent/thread_safe/util'
module Concurrent
if Concurrent.on_cruby?
# Because MRI never runs code in parallel, the existing
# non-thread-safe structures should usually work fine.
# @!macro [attach] concurrent_array
#
# A thread-safe subclass of ... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/constants.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/constants.rb | module Concurrent
# Various classes within allows for +nil+ values to be stored,
# so a special +NULL+ token is required to indicate the "nil-ness".
# @!visibility private
NULL = Object.new
end
| ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/timer_task.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/timer_task.rb | require 'concurrent/collection/copy_on_notify_observer_set'
require 'concurrent/concern/dereferenceable'
require 'concurrent/concern/observable'
require 'concurrent/atomic/atomic_boolean'
require 'concurrent/executor/executor_service'
require 'concurrent/executor/ruby_executor_service'
require 'concurrent/executor/safe... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomics.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomics.rb | # @!macro [new] atomic_reference
#
# An object reference that may be updated atomically. All read and write
# operations have java volatile semantic.
#
# @!macro thread_safe_variable_comparison
#
# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicReference.html
# @see http://doc... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/delay.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/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 ... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/exchanger.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/exchanger.rb | require 'concurrent/constants'
require 'concurrent/errors'
require 'concurrent/maybe'
require 'concurrent/atomic/atomic_reference'
require 'concurrent/atomic/count_down_latch'
require 'concurrent/utility/engine'
require 'concurrent/utility/monotonic_time'
module Concurrent
# @!macro [attach] exchanger
#
# A s... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/tvar.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/tvar.rb | require 'set'
require 'concurrent/synchronization'
module Concurrent
# A `TVar` is a transactional variable - a single-element container that
# is used as part of a transaction - see `Concurrent::atomically`.
#
# @!macro thread_safe_variable_comparison
#
# {include:file:doc/tvar.md}
class TVar < Synchro... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/settable_struct.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/settable_struct.rb | require 'concurrent/synchronization/abstract_struct'
require 'concurrent/errors'
require 'concurrent/synchronization'
module Concurrent
# An thread-safe, write-once variation of Ruby's standard `Struct`.
# Each member can have its value set at most once, either at construction
# or any time thereafter. Attempti... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/configuration.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/configuration.rb | require 'thread'
require 'concurrent/delay'
require 'concurrent/errors'
require 'concurrent/atomic/atomic_reference'
require 'concurrent/concern/logging'
require 'concurrent/executor/immediate_executor'
require 'concurrent/utility/at_exit'
require 'concurrent/utility/processor_counter'
module Concurrent
extend Conce... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executors.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executors.rb | require 'concurrent/executor/abstract_executor_service'
require 'concurrent/executor/cached_thread_pool'
require 'concurrent/executor/executor_service'
require 'concurrent/executor/fixed_thread_pool'
require 'concurrent/executor/immediate_executor'
require 'concurrent/executor/indirect_immediate_executor'
require 'conc... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atom.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atom.rb | require 'concurrent/atomic/atomic_reference'
require 'concurrent/collection/copy_on_notify_observer_set'
require 'concurrent/concern/observable'
require 'concurrent/synchronization'
# @!macro [new] thread_safe_variable_comparison
#
# ## Thread-safe Variable Classes
#
# Each of the thread-safe variable classes is d... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/immutable_struct.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/immutable_struct.rb | require 'concurrent/synchronization/abstract_struct'
require 'concurrent/synchronization'
module Concurrent
# A thread-safe, immutable variation of Ruby's standard `Struct`.
#
# @see http://ruby-doc.org/core-2.2.0/Struct.html Ruby standard library `Struct`
module ImmutableStruct
include Synchronization::A... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/dataflow.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/dataflow.rb | require 'concurrent/future'
require 'concurrent/atomic/atomic_fixnum'
module Concurrent
# @!visibility private
class DependencyCounter # :nodoc:
def initialize(count, &block)
@counter = AtomicFixnum.new(count)
@block = block
end
def update(time, value, reason)
if @counter.decrement... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/ivar.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/ivar.rb | require 'concurrent/constants'
require 'concurrent/errors'
require 'concurrent/collection/copy_on_write_observer_set'
require 'concurrent/concern/obligation'
require 'concurrent/concern/observable'
require 'concurrent/synchronization'
module Concurrent
# An `IVar` is like a future that you can assign. As a future i... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/scheduled_task.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/scheduled_task.rb | require 'concurrent/constants'
require 'concurrent/errors'
require 'concurrent/configuration'
require 'concurrent/ivar'
require 'concurrent/collection/copy_on_notify_observer_set'
require 'concurrent/utility/monotonic_time'
require 'concurrent/options'
module Concurrent
# `ScheduledTask` is a close relative of `Co... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/edge.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/edge.rb | module Concurrent
# A submodule for unstable, highly experimental features that are likely to
# change often and which may never become part of the core gem. Also for
# new, experimental version of abstractions already in the core gem.
#
# Most new features should start in this module, clearly indicating the... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/lazy_register.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/lazy_register.rb | require 'concurrent/atomic/atomic_reference'
require 'concurrent/delay'
module Concurrent
# Hash-like collection that store lazys evaluated values.
#
# @example
# register = Concurrent::LazyRegister.new
# #=> #<Concurrent::LazyRegister:0x007fd7ecd5e230 @Data=#<Concurrent::AtomicReference:0x007fd7ecd5e1e... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/map.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/map.rb | require 'thread'
require 'concurrent/constants'
require 'concurrent/synchronization'
module Concurrent
# @!visibility private
module Collection
# @!visibility private
MapImplementation = if Concurrent.java_extensions_loaded?
# noinspection RubyResolve
JR... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/promise.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/promise.rb | require 'thread'
require 'concurrent/constants'
require 'concurrent/errors'
require 'concurrent/ivar'
require 'concurrent/executor/safe_task_executor'
require 'concurrent/options'
module Concurrent
PromiseExecutionError = Class.new(StandardError)
# Promises are inspired by the JavaScript [Promises/A](http://wik... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/mutable_struct.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/mutable_struct.rb | require 'concurrent/synchronization/abstract_struct'
require 'concurrent/synchronization'
module Concurrent
# An thread-safe variation of Ruby's standard `Struct`. Values can be set at
# construction or safely changed at any time during the object's lifecycle.
#
# @see http://ruby-doc.org/core-2.2.0/Struct.ht... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/mvar.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/mvar.rb | require 'concurrent/concern/dereferenceable'
require 'concurrent/synchronization'
module Concurrent
# An `MVar` is a synchronized single element container. They are empty or
# contain one item. Taking a value from an empty `MVar` blocks, as does
# putting a value into a full one. You can either think of them as... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/hash.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/hash.rb | require 'concurrent/utility/engine'
require 'concurrent/thread_safe/util'
module Concurrent
if Concurrent.on_cruby?
# @!macro [attach] concurrent_hash
#
# A thread-safe subclass of Hash. This version locks against the object
# itself for every method call, ensuring only one thread can be reading... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization.rb | require 'concurrent/utility/engine'
require 'concurrent/synchronization/abstract_object'
require 'concurrent/utility/native_extension_loader' # load native parts first
Concurrent.load_native_extensions
require 'concurrent/synchronization/mri_object'
require 'concurrent/synchronization/jruby_object'
require 'concurren... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/async.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/async.rb | require 'concurrent/configuration'
require 'concurrent/ivar'
require 'concurrent/synchronization/lockable_object'
module Concurrent
# A mixin module that provides simple asynchronous behavior to a class,
# turning it into a simple actor. Loosely based on Erlang's
# [gen_server](http://www.erlang.org/doc/man/gen... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/jruby_object.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/jruby_object.rb | module Concurrent
module Synchronization
if Concurrent.on_jruby? && Concurrent.java_extensions_loaded?
module JRubyAttrVolatile
def self.included(base)
base.extend(ClassMethods)
end
module ClassMethods
def attr_volatile(*names)
names.each do |name|
... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/abstract_lockable_object.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/abstract_lockable_object.rb | module Concurrent
module Synchronization
# @!visibility private
class AbstractLockableObject < Synchronization::Object
protected
# @!macro [attach] synchronization_object_method_synchronize
#
# @yield runs the block synchronized against this object,
# equivalent of java'... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/rbx_lockable_object.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/rbx_lockable_object.rb | module Concurrent
module Synchronization
# @!visibility private
# @!macro internal_implementation_note
class RbxLockableObject < AbstractLockableObject
safe_initialization!
def initialize(*defaults)
super(*defaults)
@__Waiters__ = []
@__owner__ = nil
end
... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/volatile.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/volatile.rb | module Concurrent
module Synchronization
# Volatile adds the attr_volatile class method when included.
#
# @example
# class Foo
# include Concurrent::Synchronization::Volatile
#
# attr_volatile :bar
#
# def initialize
# self.bar = 1
# end
# en... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/lockable_object.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/lockable_object.rb | module Concurrent
module Synchronization
# @!visibility private
# @!macro internal_implementation_note
LockableObjectImplementation = case
when Concurrent.on_cruby? && Concurrent.ruby_version(:<=, 1, 9, 3)
MriMonitorLockableObject
... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/mri_lockable_object.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/mri_lockable_object.rb | module Concurrent
module Synchronization
# @!visibility private
# @!macro internal_implementation_note
class MriLockableObject < AbstractLockableObject
protected
def ns_signal
@__condition__.signal
self
end
def ns_broadcast
@__condition__.broadcast
... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/rbx_object.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/rbx_object.rb | module Concurrent
module Synchronization
module RbxAttrVolatile
def self.included(base)
base.extend(ClassMethods)
end
module ClassMethods
def attr_volatile(*names)
names.each do |name|
ivar = :"@volatile_#{name}"
class_eval <<-RUBY, __FILE__, ... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/abstract_object.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/abstract_object.rb | module Concurrent
module Synchronization
# @!visibility private
# @!macro internal_implementation_note
class AbstractObject
# @abstract has to be implemented based on Ruby runtime
def initialize
raise NotImplementedError
end
# @!visibility private
# @abstract
... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/abstract_struct.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/abstract_struct.rb | module Concurrent
module Synchronization
# @!visibility private
# @!macro internal_implementation_note
module AbstractStruct
# @!visibility private
def initialize(*values)
super()
ns_initialize(*values)
end
# @!macro [attach] struct_length
#
# Retur... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/jruby_lockable_object.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/jruby_lockable_object.rb | module Concurrent
module Synchronization
if Concurrent.on_jruby? && Concurrent.java_extensions_loaded?
# @!visibility private
# @!macro internal_implementation_note
class JRubyLockableObject < AbstractLockableObject
end
end
end
end
| ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/object.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/object.rb | module Concurrent
module Synchronization
# @!visibility private
# @!macro internal_implementation_note
ObjectImplementation = case
when Concurrent.on_cruby?
MriObject
when Concurrent.on_jruby?
... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/truffle_lockable_object.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/truffle_lockable_object.rb | module Concurrent
module Synchronization
class TruffleLockableObject < AbstractLockableObject
def new(*)
raise NotImplementedError
end
end
end
end
| ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/mri_object.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/mri_object.rb | module Concurrent
module Synchronization
module MriAttrVolatile
def self.included(base)
base.extend(ClassMethods)
end
module ClassMethods
def attr_volatile(*names)
names.each do |name|
ivar = :"@volatile_#{name}"
class_eval <<-RUBY, __FILE__, _... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/truffle_object.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/truffle_object.rb | module Concurrent
module Synchronization
module TruffleAttrVolatile
def self.included(base)
base.extend(ClassMethods)
end
module ClassMethods
def attr_volatile(*names)
# TODO may not always be available
attr_atomic(*names)
end
end
def fu... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/lock.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/lock.rb | module Concurrent
module Synchronization
# TODO (pitr-ch 04-Dec-2016): should be in edge
class Lock < LockableObject
# TODO use JavaReentrantLock on JRuby
public :synchronize
def wait(timeout = nil)
synchronize { ns_wait(timeout) }
end
public :ns_wait
def wait_u... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/condition.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/condition.rb | module Concurrent
module Synchronization
# TODO (pitr-ch 04-Dec-2016): should be in edge
class Condition < LockableObject
safe_initialization!
# TODO (pitr 12-Sep-2015): locks two objects, improve
# TODO (pitr 26-Sep-2015): study
# http://grepcode.com/file/repository.grepcode.com/java... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/synchronized_delegator.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/synchronized_delegator.rb | require 'delegate'
require 'monitor'
module Concurrent
unless defined?(SynchronizedDelegator)
# This class provides a trivial way to synchronize all calls to a given object
# by wrapping it with a `Delegator` that performs `Monitor#enter/exit` calls
# around the delegated `#send`. Example:
#
# ... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util.rb | module Concurrent
# @!visibility private
module ThreadSafe
# @!visibility private
module Util
# TODO (pitr-ch 15-Oct-2016): migrate to Utility::NativeInteger
FIXNUM_BIT_SIZE = (0.size * 8) - 2
MAX_INT = (2 ** FIXNUM_BIT_SIZE) - 1
# TODO (pitr-ch 15-Oct-2016): migrate to Ut... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/cheap_lockable.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/cheap_lockable.rb | require 'concurrent/thread_safe/util'
require 'concurrent/thread_safe/util/volatile'
module Concurrent
# @!visibility private
module ThreadSafe
# @!visibility private
module Util
# Provides a cheapest possible (mainly in terms of memory usage) +Mutex+
# with the +ConditionVariable+ bundled i... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/volatile.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/volatile.rb | require 'concurrent/thread_safe/util'
module Concurrent
# @!visibility private
module ThreadSafe
# @!visibility private
module Util
# @!visibility private
module Volatile
# Provides +volatile+ (in the JVM's sense) attribute accessors implemented
# atop of +Concurrent::... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/striped64.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/striped64.rb | require 'concurrent/thread_safe/util'
require 'concurrent/thread_safe/util/power_of_two_tuple'
require 'concurrent/thread_safe/util/volatile'
require 'concurrent/thread_safe/util/xor_shift_random'
module Concurrent
# @!visibility private
module ThreadSafe
# @!visibility private
module Util
# A Rub... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/xor_shift_random.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/xor_shift_random.rb | require 'concurrent/thread_safe/util'
module Concurrent
# @!visibility private
module ThreadSafe
# @!visibility private
module Util
# A xorshift random number (positive +Fixnum+s) generator, provides
# reasonably cheap way to generate thread local random numbers without
# contending fo... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/adder.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/adder.rb | require 'concurrent/thread_safe/util'
require 'concurrent/thread_safe/util/striped64'
module Concurrent
# @!visibility private
module ThreadSafe
# @!visibility private
module Util
# A Ruby port of the Doug Lea's jsr166e.LondAdder class version 1.8
# available in public domain.
#
... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/power_of_two_tuple.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/power_of_two_tuple.rb | require 'concurrent/thread_safe/util'
require 'concurrent/tuple'
module Concurrent
# @!visibility private
module ThreadSafe
# @!visibility private
module Util
# @!visibility private
class PowerOfTwoTuple < Concurrent::Tuple
def initialize(size)
raise ArgumentError, "size m... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/array_hash_rbx.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/array_hash_rbx.rb | require 'concurrent/thread_safe/util'
module Concurrent
module ThreadSafe
module Util
def self.make_synchronized_on_rbx(klass)
klass.class_eval do
private
def _mon_initialize
@_monitor = Monitor.new unless @_monitor # avoid double initialisation
end
... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/ruby_non_concurrent_priority_queue.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/ruby_non_concurrent_priority_queue.rb | module Concurrent
module Collection
# @!macro priority_queue
#
# @!visibility private
# @!macro internal_implementation_note
class RubyNonConcurrentPriorityQueue
# @!macro priority_queue_method_initialize
def initialize(opts = {})
order = opts.fetch(:order, :max)
@co... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/copy_on_write_observer_set.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/copy_on_write_observer_set.rb | require 'concurrent/synchronization'
module Concurrent
module Collection
# A thread safe observer set implemented using copy-on-write approach:
# every time an observer is added or removed the whole internal data structure is
# duplicated and replaced with a new one.
#
# @api private
class C... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/copy_on_notify_observer_set.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/copy_on_notify_observer_set.rb | require 'concurrent/synchronization'
module Concurrent
module Collection
# A thread safe observer set implemented using copy-on-read approach:
# observers are added and removed from a thread safe collection; every time
# a notification is required the internal data structure is copied to
# prevent c... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/java_non_concurrent_priority_queue.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/java_non_concurrent_priority_queue.rb | if Concurrent.on_jruby?
module Concurrent
module Collection
# @!macro priority_queue
#
# @!visibility private
# @!macro internal_implementation_note
class JavaNonConcurrentPriorityQueue
# @!macro priority_queue_method_initialize
def initialize(opts = {})
... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/non_concurrent_priority_queue.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/non_concurrent_priority_queue.rb | require 'concurrent/collection/java_non_concurrent_priority_queue'
require 'concurrent/collection/ruby_non_concurrent_priority_queue'
require 'concurrent/utility/engine'
module Concurrent
module Collection
# @!visibility private
# @!macro internal_implementation_note
NonConcurrentPriorityQueueImplementa... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/map/non_concurrent_map_backend.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/map/non_concurrent_map_backend.rb | require 'concurrent/constants'
module Concurrent
# @!visibility private
module Collection
# @!visibility private
class NonConcurrentMapBackend
# WARNING: all public methods of the class must operate on the @backend
# directly without calling each other. This is important because of the
... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/map/mri_map_backend.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/map/mri_map_backend.rb | require 'thread'
require 'concurrent/collection/map/non_concurrent_map_backend'
module Concurrent
# @!visibility private
module Collection
# @!visibility private
class MriMapBackend < NonConcurrentMapBackend
def initialize(options = nil)
super(options)
@write_lock = Mutex.new
... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/map/synchronized_map_backend.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/map/synchronized_map_backend.rb | require 'concurrent/collection/map/non_concurrent_map_backend'
module Concurrent
# @!visibility private
module Collection
# @!visibility private
class SynchronizedMapBackend < NonConcurrentMapBackend
require 'mutex_m'
include Mutex_m
# WARNING: Mutex_m is a non-reentrant lock, so the s... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/map/atomic_reference_map_backend.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/map/atomic_reference_map_backend.rb | require 'concurrent/constants'
require 'concurrent/thread_safe/util'
require 'concurrent/thread_safe/util/adder'
require 'concurrent/thread_safe/util/cheap_lockable'
require 'concurrent/thread_safe/util/power_of_two_tuple'
require 'concurrent/thread_safe/util/volatile'
require 'concurrent/thread_safe/util/xor_shift_ran... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | true |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/java_count_down_latch.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/java_count_down_latch.rb | if Concurrent.on_jruby?
module Concurrent
# @!macro count_down_latch
# @!visibility private
# @!macro internal_implementation_note
class JavaCountDownLatch
# @!macro count_down_latch_method_initialize
def initialize(count = 1)
unless count.is_a?(Fixnum) && count >= 0
r... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/semaphore.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/semaphore.rb | require 'concurrent/atomic/mutex_semaphore'
require 'concurrent/synchronization'
module Concurrent
###################################################################
# @!macro [new] semaphore_method_initialize
#
# Create a new `Semaphore` with the initial `count`.
#
# @param [Fixnum] count the initi... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/mutex_atomic_boolean.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/mutex_atomic_boolean.rb | require 'concurrent/synchronization'
module Concurrent
# @!macro atomic_boolean
# @!visibility private
# @!macro internal_implementation_note
class MutexAtomicBoolean < Synchronization::LockableObject
# @!macro atomic_boolean_method_initialize
def initialize(initial = false)
super()
synch... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/ruby_thread_local_var.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/ruby_thread_local_var.rb | require 'thread'
require 'concurrent/atomic/abstract_thread_local_var'
module Concurrent
# @!visibility private
# @!macro internal_implementation_note
class RubyThreadLocalVar < AbstractThreadLocalVar
# Each thread has a (lazily initialized) array of thread-local variable values
# Each time a new threa... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/event.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/event.rb | require 'thread'
require 'concurrent/synchronization'
module Concurrent
# Old school kernel-style event reminiscent of Win32 programming in C++.
#
# When an `Event` is created it is in the `unset` state. Threads can choose to
# `#wait` on the event, blocking until released by another thread. When one
# thre... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/mutex_count_down_latch.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/mutex_count_down_latch.rb | require 'concurrent/synchronization'
module Concurrent
# @!macro count_down_latch
# @!visibility private
# @!macro internal_implementation_note
class MutexCountDownLatch < Synchronization::LockableObject
# @!macro count_down_latch_method_initialize
def initialize(count = 1)
Utility::NativeInteg... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/cyclic_barrier.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/cyclic_barrier.rb | require 'concurrent/synchronization'
require 'concurrent/utility/native_integer'
module Concurrent
# A synchronization aid that allows a set of threads to all wait for each
# other to reach a common barrier point.
# @example
# barrier = Concurrent::CyclicBarrier.new(3)
# jobs = Array.new(3) { |i| -> ... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/mutex_atomic_fixnum.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/mutex_atomic_fixnum.rb | require 'concurrent/synchronization'
require 'concurrent/utility/native_integer'
module Concurrent
# @!macro atomic_fixnum
# @!visibility private
# @!macro internal_implementation_note
class MutexAtomicFixnum < Synchronization::LockableObject
# @!macro atomic_fixnum_method_initialize
def initialize(i... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_boolean.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_boolean.rb | require 'concurrent/atomic/mutex_atomic_boolean'
require 'concurrent/synchronization'
module Concurrent
###################################################################
# @!macro [new] atomic_boolean_method_initialize
#
# Creates a new `AtomicBoolean` with the given initial value.
#
# @param [Bool... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/thread_local_var.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/thread_local_var.rb | require 'concurrent/atomic/ruby_thread_local_var'
require 'concurrent/atomic/java_thread_local_var'
require 'concurrent/utility/engine'
module Concurrent
###################################################################
# @!macro [new] thread_local_var_method_initialize
#
# Creates a thread local variabl... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_fixnum.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_fixnum.rb | require 'concurrent/atomic/mutex_atomic_fixnum'
require 'concurrent/synchronization'
module Concurrent
###################################################################
# @!macro [new] atomic_fixnum_method_initialize
#
# Creates a new `AtomicFixnum` with the given initial value.
#
# @param [Fixnum]... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/reentrant_read_write_lock.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/reentrant_read_write_lock.rb | require 'thread'
require 'concurrent/atomic/atomic_reference'
require 'concurrent/errors'
require 'concurrent/synchronization'
require 'concurrent/atomic/thread_local_var'
module Concurrent
# Re-entrant read-write lock implementation
#
# Allows any number of concurrent readers, but only one concurrent writer
... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/mutex_semaphore.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/mutex_semaphore.rb | require 'concurrent/synchronization'
require 'concurrent/utility/native_integer'
module Concurrent
# @!macro semaphore
# @!visibility private
# @!macro internal_implementation_note
class MutexSemaphore < Synchronization::LockableObject
# @!macro semaphore_method_initialize
def initialize(count)
... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/java_thread_local_var.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/java_thread_local_var.rb | require 'concurrent/atomic/abstract_thread_local_var'
if Concurrent.on_jruby?
module Concurrent
# @!visibility private
# @!macro internal_implementation_note
class JavaThreadLocalVar < AbstractThreadLocalVar
# @!macro thread_local_var_method_get
def value
value = @var.get
... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/abstract_thread_local_var.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/abstract_thread_local_var.rb | require 'concurrent/constants'
module Concurrent
# @!macro thread_local_var
# @!macro internal_implementation_note
# @!visibility private
class AbstractThreadLocalVar
# @!macro thread_local_var_method_initialize
def initialize(default = nil, &default_block)
if default && block_given?
ra... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_reference.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_reference.rb | require 'concurrent/synchronization'
require 'concurrent/utility/engine'
require 'concurrent/atomic_reference/concurrent_update_error'
require 'concurrent/atomic_reference/mutex_atomic'
begin
# force fallback impl with FORCE_ATOMIC_FALLBACK=1
if /[^0fF]/ =~ ENV['FORCE_ATOMIC_FALLBACK']
ruby_engine = 'mutex_ato... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/count_down_latch.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/count_down_latch.rb | require 'concurrent/atomic/mutex_count_down_latch'
require 'concurrent/atomic/java_count_down_latch'
require 'concurrent/utility/engine'
module Concurrent
###################################################################
# @!macro [new] count_down_latch_method_initialize
#
# Create a new `CountDownLatch`... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/read_write_lock.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/read_write_lock.rb | require 'thread'
require 'concurrent/atomic/atomic_fixnum'
require 'concurrent/errors'
require 'concurrent/synchronization'
module Concurrent
# Ruby read-write lock implementation
#
# Allows any number of concurrent readers, but only one concurrent writer
# (And if the "write" lock is taken, any readers who c... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb | require 'thread'
require 'concurrent/atomic/event'
require 'concurrent/concern/logging'
require 'concurrent/executor/ruby_executor_service'
require 'concurrent/utility/monotonic_time'
module Concurrent
# @!macro thread_pool_executor
# @!macro thread_pool_options
# @!visibility private
class RubyThreadPoolExec... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/simple_executor_service.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/simple_executor_service.rb | require 'concurrent/atomics'
require 'concurrent/executor/executor_service'
module Concurrent
# An executor service in which every operation spawns a new,
# independently operating thread.
#
# This is perhaps the most inefficient executor service in this
# library. It exists mainly for testing an debugging.... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/thread_pool_executor.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/thread_pool_executor.rb | require 'concurrent/utility/engine'
require 'concurrent/executor/ruby_thread_pool_executor'
module Concurrent
if Concurrent.on_jruby?
require 'concurrent/executor/java_thread_pool_executor'
end
ThreadPoolExecutorImplementation = case
when Concurrent.on_jruby?
... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/single_thread_executor.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/single_thread_executor.rb | require 'concurrent/executor/ruby_single_thread_executor'
module Concurrent
if Concurrent.on_jruby?
require 'concurrent/executor/java_single_thread_executor'
end
SingleThreadExecutorImplementation = case
when Concurrent.on_jruby?
... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/java_single_thread_executor.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/java_single_thread_executor.rb | if Concurrent.on_jruby?
require 'concurrent/executor/java_executor_service'
require 'concurrent/executor/serial_executor_service'
module Concurrent
# @!macro single_thread_executor
# @!macro abstract_executor_service_public_api
# @!visibility private
class JavaSingleThreadExecutor < JavaExecuto... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/java_thread_pool_executor.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/java_thread_pool_executor.rb | if Concurrent.on_jruby?
require 'concurrent/executor/java_executor_service'
module Concurrent
# @!macro thread_pool_executor
# @!macro thread_pool_options
# @!visibility private
class JavaThreadPoolExecutor < JavaExecutorService
# @!macro thread_pool_executor_constant_default_max_pool_size... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_executor_service.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_executor_service.rb | require 'concurrent/executor/abstract_executor_service'
require 'concurrent/atomic/event'
module Concurrent
# @!macro abstract_executor_service_public_api
# @!visibility private
class RubyExecutorService < AbstractExecutorService
safe_initialization!
def initialize(*args, &block)
super
@Sto... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/cached_thread_pool.rb | _vendor/ruby/2.6.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/cached_thread_pool.rb | require 'concurrent/utility/engine'
require 'concurrent/executor/thread_pool_executor'
module Concurrent
# A thread pool that dynamically grows and shrinks to fit the current workload.
# New threads are created as needed, existing threads are reused, and threads
# that remain idle for too long are killed and re... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.