[#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:81632] [Ruby trunk Feature#11484] add output offset for readpartial/read_nonblock/etc
From:
samuel@...
Date:
2017-06-09 08:21:36 UTC
List:
ruby-core #81632
Issue #11484 has been updated by ioquatix (Samuel Williams).
This is a great idea, but I propose the argument is called simply `offset:`
----------------------------------------
Feature #11484: add output offset for readpartial/read_nonblock/etc
https://bugs.ruby-lang.org/issues/11484#change-65328
* Author: normalperson (Eric Wong)
* Status: Open
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
* Target version:
----------------------------------------
~~~
Specifying a destination offset will allow allocating less garbage
strings to improve performance when reading partial data off a pipe
or socket.
For example:
tmp = "".b
buf = "".b
case rv = io.read_nonblock(8192, tmp, exception: false)
when String
buf << tmp
break if parsing_done?(buf)
else
return rv
end while true
Can be written as:
buf = "".b
case rv = io.read_nonblock(8192, buf, exception: false, off_out: buf.size)
when String
break if parsing_done?(buf)
else
return rv
end while true
For reference, here is the relevant part from "perldoc -f sysread"
sysread FILEHANDLE,SCALAR,LENGTH,OFFSET
sysread FILEHANDLE,SCALAR,LENGTH
-snip-
An OFFSET may be specified to place the read data at some place
in the string other than the beginning. A negative OFFSET
specifies placement at that many characters counting backwards
from the end of the string. A positive OFFSET greater than the
length of SCALAR results in the string being padded to the
required size with "\0" bytes before the result of the read is
appended.
-snip-
Maybe we can shortcut by allowing "off_out: :end" to avoid redundant
words and potentially using the wrong variable:
io.read_nonblock(8192, buf, exception: false, off_out: :end)
I'm not sure when I'll have time to work on this feature.
Lately I've been working in Perl again and rediscovered this API subtlety.
~~~
--
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>