[#81492] [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — normalperson@...
Issue #13618 has been reported by normalperson (Eric Wong).
12 messages
2017/06/01
[#88695] Re: [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
— Eric Wong <normalperson@...>
2018/08/27
> https://bugs.ruby-lang.org/issues/13618
[#81569] [Ruby trunk Feature#12589] VM performance improvement proposal — vmakarov@...
Issue #12589 has been updated by vmakarov (Vladimir Makarov).
3 messages
2017/06/04
[#81581] [Ruby trunk Bug#13632] Not processable interrupt queue for a thread after it's notified that FD is closed in some other thread. — sir.nickolas@...
Issue #13632 has been reported by nvashchenko (Nikolay Vashchenko).
4 messages
2017/06/05
[#81590] Re: [ruby-cvs:66197] ko1:r59023 (trunk): revert r59020 because it may fail some tests sometimes on some environment (http://ci.rvm.jp/). This revert is to check the reason of failures. — Eric Wong <normalperson@...>
ko1@ruby-lang.org wrote:
5 messages
2017/06/06
[#81591] Re: [ruby-cvs:66197] ko1:r59023 (trunk): revert r59020 because it may fail some tests sometimes on some environment (http://ci.rvm.jp/). This revert is to check the reason of failures.
— Eric Wong <normalperson@...>
2017/06/06
Eric Wong <normalperson@yhbt.net> wrote:
[#81596] Re: [ruby-cvs:66203] Re: Re: ko1:r59023 (trunk): revert r59020 because it may fail some tests sometimes on some environment (http://ci.rvm.jp/). This revert is to check the reason of failures.
— Eric Wong <normalperson@...>
2017/06/06
Eric Wong <normalperson@yhbt.net> wrote:
[#81825] [Ruby trunk Feature#13697] [PATCH]: futex based thread primitives — normalperson@...
Issue #13697 has been reported by normalperson (Eric Wong).
3 messages
2017/06/29
[ruby-core:81740] [Ruby trunk Feature#2631][Open] Allow IO#reopen to take a block
From:
naruse@...
Date:
2017-06-22 08:35:20 UTC
List:
ruby-core #81740
Issue #2631 has been updated by naruse (Yui NARUSE).
Status changed from Closed to Open
匿名ユーザー wrote:
> Applied in changeset trunk|r59142.
>
> ----------
> Allow IO#reopen to take a block
>
> * io.c (rb_io_reopen): take a block and ensure the IO closed
> [Feature #2631]
>
> * test/ruby/test_io.rb: add a test
>
> * NEWS: add an entry for this change
This patch looks doesn't recover the original $stdout.
Morever though this was approved before, this is strange because block changes global state.
If this is introduced in 7 years ago, it may be acceptable.
But in this 201x year Ruby really should support multithread unsafe code?
People who want to write unsafe code should explicitly write code like following.
```
require 'mkmf'
# stdout redirected within block only
orig_stdout = $stdout
open(IO:NULL, 'w') do |f|
$stdout = f
if have_header('foo.h')
# Do stuff
end
ensure
$stdout = orig_stdout
end
```
----------------------------------------
Feature #2631: Allow IO#reopen to take a block
https://bugs.ruby-lang.org/issues/2631#change-65442
* Author: djberg96 (Daniel Berger)
* Status: Open
* Priority: Normal
* Assignee: shyouhei (Shyouhei Urabe)
* Target version: next minor
----------------------------------------
=begin
Please allow IO#reopen to accept a block. This would allow users to temporarily redirect output without having to manually reset the file descriptor. For example:
require 'mkmf'
# stdout redirected within block only
$stdout.reopen('/dev/null') do
if have_header('foo.h')
# Do stuff
end
end
# stdout now back to its former setting
I believe this is both convenient and intuitive when one considers the IO.open also takes a block.
Regards,
Dan
=end
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>