Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded to latest version of concurrent-ruby #311

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ group :development, :test do
end

platform :mri do
# The implementation of ReadWriteLock in Volt uses concurrent ruby and ext helps performance.
gem 'concurrent-ruby-ext'
# ReadWriteLock in Volt comes from concurrent ruby and ext helps performance.
gem 'concurrent-ruby-ext', '~> 1.0.0.pre3', '< 2.0.0'

# For debugging
gem 'pry-byebug', '~> 2.0.0', require: false
Expand Down
2 changes: 1 addition & 1 deletion lib/volt/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

require 'rack'
require 'sass'
require 'concurrent'
require 'volt/utils/tilt_patch'

require 'volt'
Expand All @@ -13,7 +14,6 @@
require 'volt/server/template_handlers/sprockets_component_handler'

require 'volt/server/websocket/websocket_handler'
require 'volt/utils/read_write_lock'
require 'volt/server/forking_server'
require 'volt/server/websocket/rack_server_adaptor'

Expand Down
2 changes: 1 addition & 1 deletion lib/volt/server/forking_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module Volt
class ForkingServer
def initialize(server)
# A read write lock for accessing and creating the lock
@child_lock = ReadWriteLock.new
@child_lock = Concurrent::ReadWriteLock.new

# Trap exit
at_exit do
Expand Down
171 changes: 0 additions & 171 deletions lib/volt/utils/read_write_lock.rb

This file was deleted.

4 changes: 2 additions & 2 deletions spec/apps/kitchen_sink/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ end

# Server for MRI
platform :mri do
# The implementation of ReadWriteLock in Volt uses concurrent ruby and ext helps performance.
gem 'concurrent-ruby-ext', '~> 0.8.0'
# ReadWriteLock in Volt comes from concurrent ruby and ext helps performance.
gem 'concurrent-ruby-ext', '~> 1.0.0.pre3', '< 2.0.0'

# Thin is the default volt server, you Puma is also supported
gem 'thin', '~> 1.6.0'
Expand Down
6 changes: 3 additions & 3 deletions templates/newgem/Gemfile.tt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ gemspec

# Optional Gems for testing/dev

# The implementation of ReadWriteLock in Volt uses concurrent ruby and ext helps performance.
gem 'concurrent-ruby-ext', '~> 0.8.0'
# ReadWriteLock in Volt comes from concurrent ruby and ext helps performance.
gem 'concurrent-ruby-ext', '~> 1.0.0.pre3', '< 2.0.0'

# For mongo (optional)
gem 'bson_ext', '~> 1.9.0'

# Gems you use for development should be added to the gemspec file as
# development dependencies.
# development dependencies.
4 changes: 2 additions & 2 deletions templates/project/Gemfile.tt
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ end

# Server for MRI
platform :mri, :mingw, :x64_mingw do
# The implementation of ReadWriteLock in Volt uses concurrent ruby and ext helps performance.
gem 'concurrent-ruby-ext', '~> 0.8.0'
# ReadWriteLock in Volt comes from concurrent ruby and ext helps performance.
gem 'concurrent-ruby-ext', '~> 1.0.0.pre3', '< 2.0.0'

# Thin is the default volt server, Puma is also supported
gem 'thin', '~> 1.6.0'
Expand Down
5 changes: 2 additions & 3 deletions volt.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ Gem::Specification.new do |spec|
spec.add_dependency 'faye-websocket', '~> 0.10.0'
spec.add_dependency 'sprockets-helpers', '~> 1.2.1'

# Locking down concurrent-ruby because one currently used feature is going to
# be deprecated (which we need to build a work around for)
spec.add_dependency 'concurrent-ruby', '= 0.8.0'
# 1.0.0 will be released before 15 November 2015
spec.add_dependency 'concurrent-ruby', '~> 1.0.0.pre3', '< 2.0.0'

# For user passwords
spec.add_dependency 'bcrypt', '~> 3.1.9'
Expand Down