[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7709":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":22,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":16,"starSnapshotCount":16,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},7709,"concurrent-ruby","ruby-concurrency\u002Fconcurrent-ruby","ruby-concurrency","Modern concurrency tools including agents, futures, promises, thread pools, supervisors, and more. Inspired by Erlang, Clojure, Scala, Go, Java, JavaScript, and classic concurrency patterns.","https:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002F",null,"Ruby",5829,412,112,48,0,15,38.85,"Other",false,"master",true,[24,25],"concurrency","ruby","2026-06-12 02:01:43","# Concurrent Ruby\n\n[![Gem Version](https:\u002F\u002Fbadge.fury.io\u002Frb\u002Fconcurrent-ruby.svg)](http:\u002F\u002Fbadge.fury.io\u002Frb\u002Fconcurrent-ruby)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-green.svg)](http:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n[![Gitter chat](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FIRC%20(gitter)-devs%20%26%20users-brightgreen.svg)](https:\u002F\u002Fgitter.im\u002Fruby-concurrency\u002Fconcurrent-ruby)\n\nModern concurrency tools for Ruby. Inspired by\n[Erlang](http:\u002F\u002Fwww.erlang.org\u002Fdoc\u002Freference_manual\u002Fprocesses.html),\n[Clojure](http:\u002F\u002Fclojure.org\u002Fconcurrent_programming),\n[Scala](http:\u002F\u002Fakka.io\u002F),\n[Haskell](http:\u002F\u002Fwww.haskell.org\u002Fhaskellwiki\u002FApplications_and_libraries\u002FConcurrency_and_parallelism#Concurrent_Haskell),\n[F#](http:\u002F\u002Fblogs.msdn.com\u002Fb\u002Fdsyme\u002Farchive\u002F2010\u002F02\u002F15\u002Fasync-and-parallel-design-patterns-in-f-part-3-agents.aspx),\n[C#](http:\u002F\u002Fmsdn.microsoft.com\u002Fen-us\u002Flibrary\u002Fvstudio\u002Fhh191443.aspx),\n[Java](http:\u002F\u002Fdocs.oracle.com\u002Fjavase\u002F7\u002Fdocs\u002Fapi\u002Fjava\u002Futil\u002Fconcurrent\u002Fpackage-summary.html),\nand classic concurrency patterns.\n\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fruby-concurrency\u002Fconcurrent-ruby\u002Fmaster\u002Fdocs-source\u002Flogo\u002Fconcurrent-ruby-logo-300x300.png\" align=\"right\" style=\"margin-left: 20px;\" \u002F>\n\nThe design goals of this gem are:\n\n*   Be an 'unopinionated' toolbox that provides useful utilities without debating which is better \n    or why\n*   Remain free of external gem dependencies\n*   Stay true to the spirit of the languages providing inspiration\n*   But implement in a way that makes sense for Ruby\n*   Keep the semantics as idiomatic Ruby as possible\n*   Support features that make sense in Ruby\n*   Exclude features that don't make sense in Ruby\n*   Be small, lean, and loosely coupled\n*   Thread-safety\n*   Backward compatibility\n\n## Contributing\n\n**This gem depends on \n[contributions](https:\u002F\u002Fgithub.com\u002Fruby-concurrency\u002Fconcurrent-ruby\u002Fgraphs\u002Fcontributors) and we \nappreciate your help. Would you like to contribute? Great! Have a look at \n[issues with `looking-for-contributor` label](https:\u002F\u002Fgithub.com\u002Fruby-concurrency\u002Fconcurrent-ruby\u002Fissues?q=is%3Aissue+is%3Aopen+label%3Alooking-for-contributor).** And if you pick something up let us know on the issue.\n\nYou can also get started by triaging issues which may include reproducing bug reports or asking for vital information, such as version numbers or reproduction instructions. If you would like to start triaging issues, one easy way to get started is to [subscribe to concurrent-ruby on CodeTriage](https:\u002F\u002Fwww.codetriage.com\u002Fruby-concurrency\u002Fconcurrent-ruby). [![Open Source Helpers](https:\u002F\u002Fwww.codetriage.com\u002Fruby-concurrency\u002Fconcurrent-ruby\u002Fbadges\u002Fusers.svg)](https:\u002F\u002Fwww.codetriage.com\u002Fruby-concurrency\u002Fconcurrent-ruby)\n\n## Thread Safety\n\n*Concurrent Ruby makes one of the strongest thread safety guarantees of any Ruby concurrency \nlibrary, providing consistent behavior and guarantees on all three main Ruby interpreters\n(MRI\u002FCRuby, JRuby, TruffleRuby).*\n\nEvery abstraction in this library is thread safe. Specific thread safety guarantees are documented \nwith each abstraction.\n\nIt is critical to remember, however, that Ruby is a language of mutable references. *No*\nconcurrency library for Ruby can ever prevent the user from making thread safety mistakes (such as\nsharing a mutable object between threads and modifying it on both threads) or from creating\ndeadlocks through incorrect use of locks. All the library can do is provide safe abstractions which\nencourage safe practices. Concurrent Ruby provides more safe concurrency abstractions than any\nother Ruby library, many of which support the mantra of \n[\"Do not communicate by sharing memory; instead, share memory by communicating\"](https:\u002F\u002Fblog.golang.org\u002Fshare-memory-by-communicating).\nConcurrent Ruby is also the only Ruby library which provides a full suite of thread safe and\nimmutable variable types and data structures.\n\nWe've also initiated discussion to document the [memory model](docs-source\u002Fsynchronization.md) of Ruby which \nwould provide consistent behaviour and guarantees on all three main Ruby interpreters \n(MRI\u002FCRuby, JRuby, TruffleRuby).\n\n## Features & Documentation\n\n**The primary site for documentation is the automatically generated \n[API documentation](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Findex.html) which is up to \ndate with latest release.** This readme matches the master so may contain new stuff not yet \nreleased.\n\nWe also have a [IRC (gitter)](https:\u002F\u002Fgitter.im\u002Fruby-concurrency\u002Fconcurrent-ruby).\n\n### Versioning\n\n*   `concurrent-ruby` uses [Semantic Versioning](http:\u002F\u002Fsemver.org\u002F)\n*   `concurrent-ruby-ext` has always same version as `concurrent-ruby`\n*   `concurrent-ruby-edge` will always be 0.y.z therefore following \n    [point 4](http:\u002F\u002Fsemver.org\u002F#spec-item-4) applies *\"Major version zero \n    (0.y.z) is for initial development. Anything may change at any time. The \n    public API should not be considered stable.\"* However we additionally use \n    following rules:\n    *   Minor version increment means incompatible changes were made\n    *   Patch version increment means only compatible changes were made\n\n\n#### General-purpose Concurrency Abstractions\n\n*   [Async](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FAsync.html):\n    A mixin module that provides simple asynchronous behavior to a class. Loosely based on Erlang's \n    [gen_server](http:\u002F\u002Fwww.erlang.org\u002Fdoc\u002Fman\u002Fgen_server.html).\n*   [ScheduledTask](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FScheduledTask.html):\n    Like a Future scheduled for a specific future time.\n*   [TimerTask](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FTimerTask.html):\n    A Thread that periodically wakes up to perform work at regular intervals.\n*   [Promises](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FPromises.html):\n    Unified implementation of futures and promises which combines features of previous `Future`,\n    `Promise`, `IVar`, `Event`, `dataflow`, `Delay`, and (partially) `TimerTask` into a single \n    framework. It extensively uses the new synchronization layer to make all the features \n    **non-blocking** and **lock-free**, with the exception of obviously blocking operations like \n    `#wait`, `#value`. It also offers better performance.    \n\n#### Thread-safe Value Objects, Structures, and Collections\n\nCollection classes that were originally part of the (deprecated) `thread_safe` gem:\n\n*   [Array](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FArray.html) A thread-safe\n    subclass of Ruby's standard [Array](http:\u002F\u002Fruby-doc.org\u002Fcore\u002FArray.html).\n*   [Hash](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FHash.html) A thread-safe\n    subclass of Ruby's standard [Hash](http:\u002F\u002Fruby-doc.org\u002Fcore\u002FHash.html).\n*   [Set](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FSet.html) A thread-safe\n    subclass of Ruby's standard [Set](http:\u002F\u002Fruby-doc.org\u002Fstdlib-2.4.0\u002Flibdoc\u002Fset\u002Frdoc\u002FSet.html).\n*   [Map](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FMap.html) A hash-like object\n    that should have much better performance characteristics, especially under high concurrency, \n    than `Concurrent::Hash`.\n*   [Tuple](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FTuple.html) A fixed size\n    array with volatile (synchronized, thread safe) getters\u002Fsetters.\n\nValue objects inspired by other languages:\n\n*   [Maybe](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FMaybe.html) A thread-safe,\n    immutable object representing an optional value, based on \n    [Haskell Data.Maybe](https:\u002F\u002Fhackage.haskell.org\u002Fpackage\u002Fbase-4.2.0.1\u002Fdocs\u002FData-Maybe.html).\n\nStructure classes derived from Ruby's [Struct](http:\u002F\u002Fruby-doc.org\u002Fcore\u002FStruct.html):\n\n*   [ImmutableStruct](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FImmutableStruct.html)\n    Immutable struct where values are set at construction and cannot be changed later.\n*   [MutableStruct](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FMutableStruct.html)\n    Synchronized, mutable struct where values can be safely changed at any time.\n*   [SettableStruct](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FSettableStruct.html)\n    Synchronized, write-once struct where values can be set at most once, either at construction \n    or any time thereafter.\n\nThread-safe variables:\n\n*   [Agent](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FAgent.html): A way to\n    manage shared, mutable, *asynchronous*, independent state. Based on Clojure's \n    [Agent](http:\u002F\u002Fclojure.org\u002Fagents).\n*   [Atom](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FAtom.html): A way to manage\n    shared, mutable, *synchronous*, independent state. Based on Clojure's \n    [Atom](http:\u002F\u002Fclojure.org\u002Fatoms).\n*   [AtomicBoolean](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FAtomicBoolean.html)\n    A boolean value that can be updated atomically.\n*   [AtomicFixnum](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FAtomicFixnum.html)\n    A numeric value that can be updated atomically.\n*   [AtomicReference](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FAtomicReference.html)\n    An object reference that may be updated atomically.\n*   [Exchanger](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FExchanger.html)\n    A synchronization point at which threads can pair and swap elements within pairs. Based on \n    Java's [Exchanger](http:\u002F\u002Fdocs.oracle.com\u002Fjavase\u002F7\u002Fdocs\u002Fapi\u002Fjava\u002Futil\u002Fconcurrent\u002FExchanger.html).\n*   [MVar](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FMVar.html) A synchronized\n    single element container. Based on Haskell's \n    [MVar](https:\u002F\u002Fhackage.haskell.org\u002Fpackage\u002Fbase-4.8.1.0\u002Fdocs\u002FControl-Concurrent-MVar.html) and \n    Scala's [MVar](http:\u002F\u002Fdocs.typelevel.org\u002Fapi\u002Fscalaz\u002Fnightly\u002Findex.html#scalaz.concurrent.MVar$).\n*   [ThreadLocalVar](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FThreadLocalVar.html)\n    A variable where the value is different for each thread.\n*   [TVar](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FTVar.html) A transactional\n    variable implementing software transactional memory (STM). Based on Clojure's \n    [Ref](http:\u002F\u002Fclojure.org\u002Frefs).\n\n#### Java-inspired ThreadPools and Other Executors\n\n*   See the [thread pool](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002Ffile.thread_pools.html)\n    overview, which also contains a list of other Executors available.\n\n#### Thread Synchronization Classes and Algorithms\n\n*   [CountDownLatch](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FCountDownLatch.html)\n    A synchronization object that allows one thread to wait on multiple other threads.\n*   [CyclicBarrier](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FCyclicBarrier.html)\n    A synchronization aid that allows a set of threads to all wait for each other to reach a common barrier point.\n*   [Event](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FEvent.html) Old school\n    kernel-style event.\n*   [ReadWriteLock](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FReadWriteLock.html)\n    A lock that supports multiple readers but only one writer.\n*   [ReentrantReadWriteLock](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FReentrantReadWriteLock.html)\n    A read\u002Fwrite lock with reentrant and upgrade features.\n*   [Semaphore](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FSemaphore.html)\n    A counting-based locking mechanism that uses permits.\n*   [AtomicMarkableReference](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FAtomicMarkableReference.html)\n\n#### Deprecated\n\nDeprecated features are still available and bugs are being fixed, but new features will not be added.\n  \n*   ~~[Future](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FFuture.html):\n    An asynchronous operation that produces a value.~~ Replaced by \n    [Promises](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FPromises.html).\n    *   ~~[.dataflow](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent.html#dataflow-class_method):\n        Built on Futures, Dataflow allows you to create a task that will be scheduled when all of \n        its data dependencies are available.~~ Replaced by \n        [Promises](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FPromises.html).\n*   ~~[Promise](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FPromise.html): Similar\n    to Futures, with more features.~~ Replaced by \n    [Promises](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FPromises.html).\n*   ~~[Delay](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FDelay.html) Lazy evaluation\n    of a block yielding an immutable result. Based on Clojure's \n    [delay](https:\u002F\u002Fclojuredocs.org\u002Fclojure.core\u002Fdelay).~~ Replaced by \n    [Promises](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FPromises.html).\n*   ~~[IVar](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FIVar.html) Similar to a\n    \"future\" but can be manually assigned once, after which it becomes immutable.~~ Replaced by \n    [Promises](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FPromises.html).\n    \n### Edge Features\n\nThese are available in the `concurrent-ruby-edge` companion gem.\n\nThese features are under active development and may change frequently. They are expected not to\nkeep backward compatibility (they may also lack tests and documentation). Semantic versions will\nbe obeyed though. Features developed in `concurrent-ruby-edge` are expected to move to\n`concurrent-ruby` when final.\n\n*   [Actor](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FActor.html): Implements\n    the Actor Model, where concurrent actors exchange messages.\n    *Status: Partial documentation and tests; depends on new future\u002Fpromise framework; stability is good.*\n*   [Channel](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FChannel.html):\n    Communicating Sequential Processes ([CSP](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FCommunicating_sequential_processes)).\n    Functionally equivalent to Go [channels](https:\u002F\u002Ftour.golang.org\u002Fconcurrency\u002F2) with additional\n    inspiration from Clojure [core.async](https:\u002F\u002Fclojure.github.io\u002Fcore.async\u002F).\n    *Status: Partial documentation and tests.*\n*   [LazyRegister](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FLazyRegister.html)\n*   [LockFreeLinkedSet](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FEdge\u002FLockFreeLinkedSet.html)\n    *Status: will be moved to core soon.*\n*   [LockFreeStack](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FLockFreeStack.html)\n    *Status: missing documentation and tests.*\n*   [Promises::Channel](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FPromises\u002FChannel.html)\n    A first in first out channel that accepts messages with push family of methods and returns\n    messages with pop family of methods.\n    Pop and push operations can be represented as futures, see `#pop_op` and `#push_op`.\n    The capacity of the channel can be limited to support back pressure, use capacity option in `#initialize`.\n    `#pop` method blocks ans `#pop_op` returns pending future if there is no message in the channel.\n    If the capacity is limited the `#push` method blocks and `#push_op` returns pending future.\n*   [Cancellation](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FCancellation.html)\n    The Cancellation abstraction provides cooperative cancellation.\n\n    The standard methods `Thread#raise` of `Thread#kill` available in Ruby\n    are very dangerous (see linked the blog posts bellow).\n    Therefore concurrent-ruby provides an alternative.\n    \n    *   \u003Chttps:\u002F\u002Fjvns.ca\u002Fblog\u002F2015\u002F11\u002F27\u002Fwhy-rubys-timeout-is-dangerous-and-thread-dot-raise-is-terrifying\u002F>\n    *   \u003Chttp:\u002F\u002Fwww.mikeperham.com\u002F2015\u002F05\u002F08\u002Ftimeout-rubys-most-dangerous-api\u002F>\n    *   \u003Chttp:\u002F\u002Fblog.headius.com\u002F2008\u002F02\u002Frubys-threadraise-threadkill-timeoutrb.html>\n\n    It provides an object which represents a task which can be executed,\n    the task has to get the reference to the object and periodically cooperatively check that it is not cancelled.\n    Good practices to make tasks cancellable:\n    *   check cancellation every cycle of a loop which does significant work,\n    *   do all blocking actions in a loop with a timeout then on timeout check cancellation\n        and if ok block again with the timeout \n*   [Throttle](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FThrottle.html)\n    A tool managing concurrency level of tasks.\n*   [ErlangActor](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FErlangActor.html)\n    Actor implementation which precisely matches Erlang actor behaviour. \n    Requires at least Ruby 2.1 otherwise it's not loaded.\n*   [WrappingExecutor](http:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002FConcurrent\u002FWrappingExecutor.html) \n    A delegating executor which modifies each task before the task is given to \n    the target executor it delegates to.\n\n## Supported Ruby versions\n\n* MRI 2.3 and above\n* Latest JRuby 9000\n* Latest TruffleRuby\n\n## Usage\n\nEverything within this gem can be loaded simply by requiring it:\n\n```ruby\nrequire 'concurrent'\n```\n\nYou can also require a specific abstraction [part of the public documentation](https:\u002F\u002Fruby-concurrency.github.io\u002Fconcurrent-ruby\u002Fmaster\u002Findex.html) since concurrent-ruby 1.2.0, for example:\n```ruby\nrequire 'concurrent\u002Fmap'\nrequire 'concurrent\u002Fatomic\u002Fatomic_reference'\nrequire 'concurrent\u002Fexecutor\u002Ffixed_thread_pool'\n```\n\nTo use the tools in the Edge gem it must be required separately:\n\n```ruby\nrequire 'concurrent-edge'\n```\n\nIf the library does not behave as expected, `Concurrent.use_simple_logger(:DEBUG)` could\nhelp to reveal the problem.\n\n## Installation\n\n```shell\ngem install concurrent-ruby\n```\n\nor add the following line to Gemfile:\n\n```ruby\ngem 'concurrent-ruby', require: 'concurrent'\n```\n\nand run `bundle install` from your shell.\n\n### Edge Gem Installation\n\nThe Edge gem must be installed separately from the core gem:\n\n```shell\ngem install concurrent-ruby-edge\n```\n\nor add the following line to Gemfile:\n\n```ruby\ngem 'concurrent-ruby-edge', require: 'concurrent-edge'\n```\n\nand run `bundle install` from your shell.\n\n\n### C Extensions for MRI\n\nPotential performance improvements may be achieved under MRI by installing optional C extensions.\nTo minimise installation errors the C extensions are available in the `concurrent-ruby-ext`\nextension gem. `concurrent-ruby` and `concurrent-ruby-ext` are always released together with same\nversion. Simply install the extension gem too:\n\n```ruby\ngem install concurrent-ruby-ext\n```\n\nor add the following line to Gemfile:\n\n```ruby\ngem 'concurrent-ruby-ext'\n```\n\nand run `bundle install` from your shell.\n\nIn code it is only necessary to\n\n```ruby\nrequire 'concurrent'\n```\n\nThe `concurrent-ruby` gem will automatically detect the presence of the `concurrent-ruby-ext` gem\nand load the appropriate C extensions.\n\n#### Note For gem developers\n\nNo gems should depend on `concurrent-ruby-ext`. Doing so will force C extensions on your users. The\nbest practice is to depend on `concurrent-ruby` and let users to decide if they want C extensions.\n\n## Building the gem\n\n### Requirements\n\n* Recent CRuby\n* JRuby, `rbenv install jruby-9.2.17.0`\n* Set env variable `CONCURRENT_JRUBY_HOME` to point to it, e.g. `\u002Fusr\u002Flocal\u002Fopt\u002Frbenv\u002Fversions\u002Fjruby-9.2.17.0`\n* Install Docker or Podman, required for Windows builds\n* If `bundle config get path` is set, use `bundle config set --local path.system true` otherwise the `gem name, path: '.'` gems won't be found (Bundler limitation).\n\n### Publishing the Gem\n\n* Update `version.rb`\n* Update the CHANGELOG\n* Add the new version to `docs-source\u002Fsignpost.md`. Needs to be done only if there are visible changes in the documentation.\n* Commit (and push) the changes.\n* Use `bundle exec rake release` to release the gem.\n  It consists of `['release:checks', 'release:build', 'release:test', 'release:publish']` steps.\n  It will ask at the end before publishing anything. Steps can also be executed individually.\n\n## Maintainers\n\n* [Benoit Daloze](https:\u002F\u002Fgithub.com\u002Feregon)\n* [Matthew Draper](https:\u002F\u002Fgithub.com\u002Fmatthewd)\n* [Rafael França](https:\u002F\u002Fgithub.com\u002Frafaelfranca)\n* [Charles Oliver Nutter](https:\u002F\u002Fgithub.com\u002Fheadius)\n* [Ben Sheldon](https:\u002F\u002Fgithub.com\u002Fbensheldon)\n* [Samuel Williams](https:\u002F\u002Fgithub.com\u002Fioquatix)\n* [Joshua Young](https:\u002F\u002Fgithub.com\u002Fjoshuay03)\n\n### Special Thanks to\n\n* [Jerry D'Antonio](https:\u002F\u002Fgithub.com\u002Fjdantonio) for creating the gem\n* [Brian Durand](https:\u002F\u002Fgithub.com\u002Fbdurand) for the `ref` gem\n* [Charles Oliver Nutter](https:\u002F\u002Fgithub.com\u002Fheadius) for the `atomic` and `thread_safe` gems\n* [thedarkone](https:\u002F\u002Fgithub.com\u002Fthedarkone) for the `thread_safe` gem\n\nto the past maintainers\n\n* [Chris Seaton](https:\u002F\u002Fgithub.com\u002Fchrisseaton)\n* [Petr Chalupa](https:\u002F\u002Fgithub.com\u002Fpitr-ch)\n* [Michele Della Torre](https:\u002F\u002Fgithub.com\u002Fmighe)\n* [Paweł Obrok](https:\u002F\u002Fgithub.com\u002Fobrok)\n* [Lucas Allan](https:\u002F\u002Fgithub.com\u002Flucasallan)\n\nand to [Ruby Association](https:\u002F\u002Fwww.ruby.or.jp\u002Fen\u002F) for sponsoring a project \n[\"Enhancing Ruby’s concurrency tooling\"](https:\u002F\u002Fwww.ruby.or.jp\u002Fen\u002Fnews\u002F20181106) in 2018. \n\n## License and Copyright\n\n*Concurrent Ruby* is free software released under the \n[MIT License](http:\u002F\u002Fwww.opensource.org\u002Flicenses\u002FMIT).\n\nThe *Concurrent Ruby* [logo](https:\u002F\u002Fraw.githubusercontent.com\u002Fruby-concurrency\u002Fconcurrent-ruby\u002Fmaster\u002Fdocs-source\u002Flogo\u002Fconcurrent-ruby-logo-300x300.png) was\ndesigned by [David Jones](https:\u002F\u002Ftwitter.com\u002Fzombyboy). It is Copyright &copy; 2014 \n[Jerry D'Antonio](https:\u002F\u002Ftwitter.com\u002Fjerrydantonio). All Rights Reserved.\n","Concurrent Ruby 是一个为 Ruby 语言提供现代化并发工具的库，包括代理、未来对象、承诺、线程池、监督器等。其核心功能涵盖了一系列受 Erlang、Clojure、Scala 等多种语言启发而来的并发模式实现，旨在为开发者提供一个无外部依赖、保持 Ruby 语义特性的高效工具箱。该库特别强调了跨 MRI\u002FCRuby、JRuby 和 TruffleRuby 三大 Ruby 解释器的一致性行为与强线程安全保证，非常适合需要处理高并发场景下的 Ruby 应用开发，如后台服务、数据处理管道或是任何需要利用多核处理器优势来提升性能的应用场合。",2,"2026-06-11 03:13:57","top_language"]