by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 24 08:40
    Prajjwal commented #880
  • Sep 21 15:33
    ko1 commented #887
  • Sep 21 15:10
    ko1 commented #887
  • Sep 21 15:09
    ko1 commented #887
  • Sep 21 14:55
    ko1 commented #887
  • Sep 21 11:55
    pitr-ch commented #887
  • Sep 21 11:36
    chrisseaton commented #887
  • Sep 21 11:36
    pitr-ch commented #887
  • Sep 21 11:36
    pitr-ch commented #887
  • Sep 21 10:27
    chrisseaton commented #887
  • Sep 21 10:05
    pitr-ch commented #887
  • Sep 21 09:53
    pitr-ch assigned #887
  • Sep 21 09:53
    pitr-ch labeled #887
  • Sep 21 09:53
    pitr-ch opened #887
  • Sep 21 08:18
    pitr-ch commented #880
  • Sep 21 07:57
    pitr-ch commented #880
  • Sep 21 07:57
    pitr-ch commented #880
  • Sep 21 07:42
    pitr-ch assigned #885
  • Sep 21 07:42
    pitr-ch unassigned #885
  • Sep 21 07:42
    pitr-ch assigned #885
ndjhartman
@ndjhartman
Yes
Charles Oliver Nutter
@headius
I know how to fix that so JRuby isn't required, but you'll still need a java compiler
ndjhartman
@ndjhartman
While in theory I believe there is a meta-java for a JDK I'm not sure it's well supported
But Bitbake does support patches in the build process, so as a stop gap I just removed the line that requires the jar from the gemspec
And it """"works"""" in that it builds and fluentd, which depends on it, seems to run fine
Ideally it would be good to know for sure that not having the jar isn't an issue. Or, as an alternative I can copy over a prebuilt jar as part of the build if it's required but there wouldn't be a JRE for it regardless
Charles Oliver Nutter
@headius
so the way this appears to be set up is that concurrent-ruby gem depends on concurrent-ruby-ext gem
hmm or maybe not
I'm not familiar with how this is put together so bear with me
ndjhartman
@ndjhartman
No problem, I really appreaciate the help
Charles Oliver Nutter
@headius
yeah so the base gem does ship the JRuby extension plus the C files for the CRuby extension
concurrent-ruby-ext appears to be just the extension but I'm not sure how that fits in
It also appears that the tzinfo only needs only a small part of concurrent-ruby
Charles Oliver Nutter
@headius
ok
yah unfortunate this has such a complex build process but I think your best option right now is to just download a JRuby tarball and put it in the env
then things should build ok
the Rakefile for the project explicitly tries to build the jar
it also uses a separate library "ruby-compiler" to do that build, which wants a full JRuby install available
patching those to work will require a cascade of changes
ndjhartman
@ndjhartman
Sorry for the ignorance, but does gem build invoke rake?
Charles Oliver Nutter
@headius
but if you download a JRuby tarball and unpack it and point JRUBY_HOME at it, I think this all will work
ah I see what you're sayting
saying
no it does not...that might be an ok workaround for you if you're ok with the CRuby extension building when you install the gem
I thought you might be wanting to precompile everything
gem build will just literally include the files listed in the gemspec
if that resulting gem works for you I think you're ok
ndjhartman
@ndjhartman
Great!
Thanks a million for your help
I really appreciate you taking the time to explain things
Charles Oliver Nutter
@headius
sure, hopefully this works ok for you
Farid Zakaria
@fzakaria
Hey @headius ;
I have a question -- are you aware of any JRuby bugs on previous versions where after a Thread#kill was issued; the thread hung around?
I am investigating an issue where we are starting a watchdog thread (heartbeat); and eventually calling Thread#kill on it.
The thread seems to be alive afterwards though.
Farid Zakaria
@fzakaria
nvm
Olle Jonsson
@olleolleolle
@pitr-ch I'm attempting to configure Rubinius for CI, so that the project does not have all this Rubinius-supporting code for nothing.

Using https://travis-ci.org/ruby-concurrency/concurrent-ruby/jobs/659471195

Rubinius
osx, Xcode: xcode8 Ruby: rbx-3.107

Olle Jonsson
@olleolleolle
I figured it out, had to use Trusty dist, then it actually finds it!
Denis Semenenko
@Hyperc0der_twitter

Hey. I have a Javascript Promise/A+ background. Trying to understand the API reference, cause it's hard to find any examples for the library usage in the Net.

The question is how to create a pending Promise?

I use multiple constructor functions like: Concurrent::Promises.future and Concurrent::Promises.zip_futures (aka Promise.all) and both start to invoke resolver immediately.
I want to be able to resolve explicitly with the wait/result/value method.
Instead, now I need to add an unneeded condition like this:
result.wait unless result.fulfilled?

Thanks.

Ben Sheldon (he/him)
@bensheldon_twitter

@Hyperc0der_twitter here's a GitHub search that has plenty of code examples:

https://github.com/search?q=Concurrent%3A%3APromises.zip+-filename%3Apromise.rb+-filename%3Apromises.rb+extension%3Arb&type=Code&ref=advsearch&l=&l=
#

I do though think most usages are executing the promise and resolving.

Aditya C S
@adityacs
Hi All
How do we close Thread which is started by Channel.go
?
If we have code like below
Concurrent::Channel.go do
  loop do
    Concurrent::Channel.select do |s|
        s.take(somechannel) {
          #do something
         }
        s.take(otherchannel) {
          # dosomething
        }
     end
  end
end
Thread started by Channel.go is always active. Is there any way we can close this thread explicitly?
closing the channels will stop the loop and selection. However, the Channel.go thread will always remain active
Ben Sheldon (he/him)
@bensheldon_twitter
@adityacs hi! I don't have much experience with channels, but I have two questions:
  1. Have you verified the loop is broken? For example, by puts-ing a message after the loop-end. I don't see an block-breaking return or throw in what you posted.
  2. Concurrent ruby typically runs things on a global thread pool that will manage, reuse and recycle threads on its own. So if you're confident that the thread isn't doing any work, it shouldn't need to be actively killed.
Aditya C S
@adityacs
@bensheldon_twitter Yeah, the loop is broken and thread is not doing any work
Tomek WaƂkuski
@tomekw
Hi all! Do you recommend any resources on testing Async and TimerTask enabled classes?
Ben Sheldon (he/him)
@bensheldon_twitter
@tomekw hi! I didn't find sources in testing, but I went towards integration testing. You could probably extract and test the task method themselves. Here's what I did with RSpec if your curious: