jsduck icon indicating copy to clipboard operation
jsduck copied to clipboard

Thread.exclusive is deprecated, use Mutex

Open canonic-epicure opened this issue 9 years ago • 9 comments

After fresh installation on Ubuntu 16 there's a lot of this messages:

Thread.exclusive is deprecated, use Mutex
/var/lib/gems/2.3.0/gems/parallel-0.7.1/lib/parallel.rb:206:in `block (3 levels) in work_in_processes'
/var/lib/gems/2.3.0/gems/parallel-0.7.1/lib/parallel.rb:204:in `loop'
/var/lib/gems/2.3.0/gems/parallel-0.7.1/lib/parallel.rb:204:in `block (2 levels) in work_in_processes'
/var/lib/gems/2.3.0/gems/parallel-0.7.1/lib/parallel.rb:65:in `block (2 levels) in in_threads

canonic-epicure avatar Dec 29 '16 13:12 canonic-epicure

Perhaps upgrading parallel gem will simply do the trick.

If these messages are bothering you, you could try doing:

gem install parallel -v 1.10.0

and see how JSDuck behaves after that.

nene avatar Dec 30 '16 08:12 nene

Nope, didn't help:

After installation of parallel 1.10.0 "jsduck" was using the same old 0.7.1 version. After uninstallation of parallel 0.7.1:

dev@localhost:~/workspace/Bryntum/siesta$ build/update.sh --docs
/usr/lib/ruby/2.3.0/rubygems/dependency.rb:319:in `to_specs': Could not find 'parallel' (~> 0.7.1) - did find: [parallel-1.10.0] (Gem::LoadError)
Checked in 'GEM_PATH=/home/dev/.gem/ruby/2.3.0:/var/lib/gems/2.3.0:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.3.0:/usr/share/rubygems-integration/2.3.0:/usr/share/rubygems-integration/all', execute `gem env` for more information
        from /usr/lib/ruby/2.3.0/rubygems/specification.rb:1438:in `block in activate_dependencies'
        from /usr/lib/ruby/2.3.0/rubygems/specification.rb:1427:in `each'
        from /usr/lib/ruby/2.3.0/rubygems/specification.rb:1427:in `activate_dependencies'
        from /usr/lib/ruby/2.3.0/rubygems/specification.rb:1409:in `activate'
        from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb:68:in `block in gem'
        from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb:67:in `synchronize'
        from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb:67:in `gem'
        from /usr/local/bin/jsduck:22:in `<main>'
Docs updated

Any advice? This message definitely bothers me, as they completely floods the build logs. I've kind of "solved" the problem with:

#!/bin/bash

DIR="$( cd "$( dirname "$0" )" && pwd )"

$DIR/jsduck_original "$@" >/dev/null 2>&1

but then I miss output about possible real errors.

canonic-epicure avatar Dec 30 '16 08:12 canonic-epicure

I could try creating a release with upgraded dependency on parallel, but that will take a while, as I haven't really touched this code-base for years. Don't really take my word for it... I've intended to do some maintenance for years, but the last release was 3 years ago.

nene avatar Dec 30 '16 09:12 nene

Would be great. Pretty sure there will be more and more requests as people will start upgrading to ubuntu 16..

canonic-epicure avatar Jan 02 '17 10:01 canonic-epicure

+1 :(

celber avatar Dec 04 '17 13:12 celber

+1

Ben305 avatar Dec 13 '17 08:12 Ben305

+1

Sidnioulz avatar Jan 19 '18 20:01 Sidnioulz

For what it's worth, nene's suggestion of installing a new version of parallel did the trick for me. On MacOS, ruby 2.3.7, jsduck 5.3.4, running

sudo gem install parallel

got me parallel-1.12.1 (while having 0.7.1 still there) and no more "Thread.exclusive is deprecated, use Mutex" when exec'ing jduck!

blahgonaut avatar Sep 13 '18 14:09 blahgonaut

why is "Thread.exclusive is deprecated, use Thread::Mutex"

twz999 avatar May 13 '21 06:05 twz999