[#60404] is RB_GC_GUARD needed in rb_io_syswrite? — Eric Wong <normalperson@...>
I haven't gotten it to crash as-is, but it seems like we need to
4 messages
2014/02/01
[#60682] volatile usages — Eric Wong <normalperson@...>
Hi all, I went ahead and removed some use of volatile which were once
5 messages
2014/02/13
[#60794] [RFC] rearrange+pack vtm and time_object structs — Eric Wong <normalperson@...>
Extracted from addendum on top of Feature #9362 (cache-aligned objects).
4 messages
2014/02/16
[#61139] [ruby-trunk - Feature #9577] [Open] [PATCH] benchmark/driver.rb: align columns in text output — normalperson@...
Issue #9577 has been reported by Eric Wong.
3 messages
2014/02/28
[ruby-core:60510] [ruby-trunk - Bug #9343] [PATCH] SizedQueue#max= wakes up waiters properly
From:
ko1@...
Date:
2014-02-05 15:10:09 UTC
List:
ruby-core #60510
Issue #9343 has been updated by Koichi Sasada.
sorry for long absent.
I reviewed this patch and I have a question.
Only `diff' threads should wake-up?
Index: thread.c
===================================================================
--- thread.c (revision 44833)
+++ thread.c (working copy)
@@ -437,7 +437,7 @@
diff = max - GET_SZQUEUE_ULONGMAX(self);
}
RSTRUCT_SET(self, SZQUEUE_MAX, vmax);
- while (diff > 0 && !NIL_P(t = rb_ary_shift(GET_QUEUE_QUE(self)))) {
+ while (diff-- > 0 && !NIL_P(t = rb_ary_shift(GET_SZQUEUE_WAITERS(self)))) {
rb_thread_wakeup_alive(t);
}
return vmax;
----------------------------------------
Bug #9343: [PATCH] SizedQueue#max= wakes up waiters properly
https://bugs.ruby-lang.org/issues/9343#change-44975
* Author: Eric Wong
* Status: Open
* Priority: Normal
* Assignee: Koichi Sasada
* Category: ext
* Target version: current: 2.2.0
* ruby -v: ruby 2.2.0dev (2014-01-02 trunk 44484) [x86_64-linux]
* Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
We were accessing the wrong array and trying to wake up
elements stored in the queue :x
$ git pull git://80x24.org/ruby.git szqmaxset-wakeup
The following changes since commit d1cc0ebb38a23feb37bb16ff2df3137c3cead069:
mkrunnable.rb: fix DLL path on Windows (2014-01-02 02:41:06 +0000)
are available in the git repository at:
git://80x24.org/ruby.git szqmaxset-wakeup
for you to fetch changes up to 9932853dec14a4f62606098d452da80a54bf9ecc:
SizedQueue#max= wakes up waiters properly (2014-01-02 07:22:02 +0000)
----------------------------------------------------------------
Eric Wong (1):
SizedQueue#max= wakes up waiters properly
ext/thread/thread.c | 2 +-
test/thread/test_queue.rb | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
---Files--------------------------------
0001-SizedQueue-max-wakes-up-waiters-properly.patch (1.44 KB)
--
http://bugs.ruby-lang.org/