{"id":13514959,"url":"https://github.com/ruby-concurrency/thread_safe","last_synced_at":"2025-03-31T04:36:04.800Z","repository":{"id":17738670,"uuid":"20579727","full_name":"ruby-concurrency/thread_safe","owner":"ruby-concurrency","description":"Thread-safe collections for Ruby (merged with concurrent-ruby)","archived":true,"fork":false,"pushed_at":"2020-08-28T15:06:39.000Z","size":526,"stargazers_count":194,"open_issues_count":1,"forks_count":20,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-01-01T04:05:04.715Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://concurrent-ruby.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruby-concurrency.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-06T22:13:43.000Z","updated_at":"2023-12-20T13:48:28.000Z","dependencies_parsed_at":"2022-08-30T05:12:39.178Z","dependency_job_id":null,"html_url":"https://github.com/ruby-concurrency/thread_safe","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby-concurrency%2Fthread_safe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby-concurrency%2Fthread_safe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby-concurrency%2Fthread_safe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby-concurrency%2Fthread_safe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruby-concurrency","download_url":"https://codeload.github.com/ruby-concurrency/thread_safe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232262300,"owners_count":18496432,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T05:01:04.503Z","updated_at":"2025-03-31T04:36:04.680Z","avatar_url":"https://github.com/ruby-concurrency.png","language":"Java","readme":"# Threadsafe (Inactive, code moved to concurrent-ruby gem and repo.)\n\n[![Gem Version](https://badge.fury.io/rb/thread_safe.svg)](http://badge.fury.io/rb/thread_safe) [![Build Status](https://travis-ci.org/ruby-concurrency/thread_safe.svg?branch=master)](https://travis-ci.org/ruby-concurrency/thread_safe) [![Coverage Status](https://img.shields.io/coveralls/ruby-concurrency/thread_safe/master.svg)](https://coveralls.io/r/ruby-concurrency/thread_safe) [![Code Climate](https://codeclimate.com/github/ruby-concurrency/thread_safe.svg)](https://codeclimate.com/github/ruby-concurrency/thread_safe) [![Dependency Status](https://gemnasium.com/ruby-concurrency/thread_safe.svg)](https://gemnasium.com/ruby-concurrency/thread_safe) [![License](https://img.shields.io/badge/license-apache-green.svg)](http://opensource.org/licenses/MIT) [![Gitter chat](http://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-brightgreen.svg)](https://gitter.im/ruby-concurrency/concurrent-ruby)\n\nA collection of thread-safe versions of common core Ruby classes.\n\n__This code base is now part of the concurrent-ruby gem\nat https://github.com/ruby-concurrency/concurrent-ruby.\nThe code in this repository is no longer maintained.__\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'thread_safe'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install thread_safe\n\n## Usage\n\n```ruby\nrequire 'thread_safe'\n\nsa = ThreadSafe::Array.new # supports standard Array.new forms\nsh = ThreadSafe::Hash.new # supports standard Hash.new forms\n```\n\n`ThreadSafe::Cache` also exists, as a hash-like object, and should have\nmuch better performance characteristics esp. under high concurrency than\n`ThreadSafe::Hash`. However, `ThreadSafe::Cache` is not strictly semantically\nequivalent to a ruby `Hash` -- for instance, it does not necessarily retain\nordering by insertion time as `Hash` does. For most uses it should do fine\nthough, and we recommend you consider `ThreadSafe::Cache` instead of\n`ThreadSafe::Hash` for your concurrency-safe hash needs. It understands some\noptions when created (depending on your ruby platform) that control some of the\ninternals - when unsure just leave them out:\n\n\n```ruby\nrequire 'thread_safe'\n\ncache = ThreadSafe::Cache.new\n```\n\n## Contributing\n\n1. Fork it\n2. Clone it (`git clone git@github.com:you/thread_safe.git`)\n3. Create your feature branch (`git checkout -b my-new-feature`)\n4. Build the jar (`rake jar`) NOTE: Requires JRuby\n5. Install dependencies (`bundle install`)\n6. Commit your changes (`git commit -am 'Added some feature'`)\n7. Push to the branch (`git push origin my-new-feature`)\n8. Create new Pull Request\n","funding_links":[],"categories":["Java"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby-concurrency%2Fthread_safe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruby-concurrency%2Fthread_safe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby-concurrency%2Fthread_safe/lists"}