小编Mar*_*oon的帖子

为什么wait()和notify()不在特殊类中?

为什么wait,notifynotifyAll方法放入Object,而不是在一些分隔的类?

请注意,这个问题不是关于将它们移到Thread课堂上,我只是想知道为什么他们会乱扔垃圾Object,而不是一些新的Monitor课程.

我看到了这个想法的以下缺点:

  • 我们将无法将我们的for-other-purpose字段用作监视器.但这似乎与模块化原则一致.
  • 同步方法现在需要对生成的隐藏字段(如在闭包中)进行一些破解,this并且<MyClass>.class变为无效的监视器.

因此,我们可以从每个对象中移除5个方法,带来一点祸患.或不?

java notify wait

12
推荐指数
1
解决办法
161
查看次数

Auto-sklearn安装错误

我正在尝试使用auto-sklearn pip install auto-sklearn,但它会引发错误:

Command "/usr/bin/python3.5 -u -c "
    import setuptools, tokenize;
    __file__='/tmp/pip-build-tl8y2tfg/psutil/setup.py';
    f=getattr(tokenize, 'open', open)(__file__);
    code=f.read().replace('\r\n', '\n');
    f.close();
    exec(compile(code, __file__, 'exec'))
"install 
    --record /tmp/pip-7t8rbku0-record/install-record.txt 
    --single-version-externally-managed --compile" 
failed with error code 1 in /tmp/pip-build-tl8y2tfg/psutil/
Run Code Online (Sandbox Code Playgroud)

在我的/tmp/目录中没有以"pip-"开头的内容.

我完全按手动完成所有步骤,但仍然有此错误.

我也尝试使用这个问题的命令,但在两种情况下都得到了相同的错误.

我的操作系统是Ubuntu 16.04.2.

我该如何安装auto-sklearn?

python pip machine-learning python-3.x scikit-learn

9
推荐指数
1
解决办法
1582
查看次数

标签 统计

java ×1

machine-learning ×1

notify ×1

pip ×1

python ×1

python-3.x ×1

scikit-learn ×1

wait ×1