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

Concurrent::ScheduledTask is broken on master JRuby #4407

Closed
kirs opened this Issue Dec 22, 2016 · 4 comments

Comments

Projects
None yet
3 participants
@kirs
Contributor

kirs commented Dec 22, 2016

I'm running latest version of concurrent-ruby (1.0.3) and JRuby master.

require 'concurrent'
class Job
  def perform
    puts "ddd"
  end
end

job = Job.new
executor = Concurrent::ImmediateExecutor.new
Concurrent::ScheduledTask.execute(10, args: [job], executor: executor, &:perform)

The last line crashes with java.lang.NoSuchFieldError: SUPPORTS_FENCES (full stacktrace)

The same snippet works fine on jruby-9.1.6.0, so I believe there is a regression in 9.1.7 / master.

@headius

@olleolleolle

This comment has been minimized.

Show comment
Hide comment
@olleolleolle

olleolleolle Dec 22, 2016

Contributor

This commit removed SUPPORTS_FENCES: Remove unsafe block from build altogether 64b9553

And concurrent-ruby relies on that field: concurrent-ruby code using that field in its Java/JRuby extension

What's the new/preferred way forward for concurrent-ruby, now that this field is gone?

Can they use UnsafeFences.SUPPORTS_FENCES instead?

ruby-concurrency/concurrent-ruby@7b03abb This commit added the current solution to concurrent-ruby

Contributor

olleolleolle commented Dec 22, 2016

This commit removed SUPPORTS_FENCES: Remove unsafe block from build altogether 64b9553

And concurrent-ruby relies on that field: concurrent-ruby code using that field in its Java/JRuby extension

What's the new/preferred way forward for concurrent-ruby, now that this field is gone?

Can they use UnsafeFences.SUPPORTS_FENCES instead?

ruby-concurrency/concurrent-ruby@7b03abb This commit added the current solution to concurrent-ruby

@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius Dec 23, 2016

Member

Ahh I was worried about someone using those fields or methods. I will restore and deprecate the field.

Member

headius commented Dec 23, 2016

Ahh I was worried about someone using those fields or methods. I will restore and deprecate the field.

@headius headius closed this in 993395f Dec 23, 2016

@headius headius added this to the JRuby 9.1.7.0 milestone Dec 23, 2016

@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius Dec 23, 2016

Member

This should be fixed on master. Please confirm!

Member

headius commented Dec 23, 2016

This should be fixed on master. Please confirm!

@kirs

This comment has been minimized.

Show comment
Hide comment
@kirs

kirs Dec 24, 2016

Contributor

Thanks for fixing it! I confirm that it works.

Contributor

kirs commented Dec 24, 2016

Thanks for fixing it! I confirm that it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment