Issue #7390 has been reported by zzak (Zachary Scott). ---------------------------------------- Feature #7390: Funny Falcon Threads https://bugs.ruby-lang.org/issues/7390 Author: zzak (Zachary Scott) Status: Open Priority: Normal Assignee: mame (Yusuke Endoh) Category: core Target version: =begin From github: https://github.com/ruby/ruby/pull/104 (1) Currently, when Thread wakes on timeout, it could not remove itself from ConditionVariable waiters until it acquires lock. So that, when ConditionVariable#signal is called, it will try to wakeup such thread, instead of some one else. Simple way to avoid it, is to allow Mutex#sleep to recieve a block, which will be called right after Thread will awake, but before Mutex will be tried to lock (2) Since MatzRuby use GVL for thread isolation, and native method could not be interrupted (unless it wish), we could remove couple of calles to Mutex#synchronize (3) Usage of hash with compare_by_identity allows remove call to Array#include? in a Queue. Also it allows to remove other call Mutex#synchronize from ConditionVariable#wait in case when we rely on GVL. (4) And cosmetic changes to SizedQueue =end
on 2012-11-19 00:38
on 2012-11-19 19:12
Issue #7390 has been updated by mame (Yusuke Endoh). Status changed from Open to Assigned Assignee changed from mame (Yusuke Endoh) to ko1 (Koichi Sasada) Target version set to next minor ko1, could you consider this issue towards next minor? -- Yusuke Endoh <mame@tsg.ne.jp> ---------------------------------------- Feature #7390: Funny Falcon Threads https://bugs.ruby-lang.org/issues/7390#change-33115 Author: zzak (Zachary Scott) Status: Assigned Priority: Normal Assignee: ko1 (Koichi Sasada) Category: core Target version: next minor =begin From github: https://github.com/ruby/ruby/pull/104 (1) Currently, when Thread wakes on timeout, it could not remove itself from ConditionVariable waiters until it acquires lock. So that, when ConditionVariable#signal is called, it will try to wakeup such thread, instead of some one else. Simple way to avoid it, is to allow Mutex#sleep to recieve a block, which will be called right after Thread will awake, but before Mutex will be tried to lock (2) Since MatzRuby use GVL for thread isolation, and native method could not be interrupted (unless it wish), we could remove couple of calles to Mutex#synchronize (3) Usage of hash with compare_by_identity allows remove call to Array#include? in a Queue. Also it allows to remove other call Mutex#synchronize from ConditionVariable#wait in case when we rely on GVL. (4) And cosmetic changes to SizedQueue =end
on 2012-11-19 23:51
(2012/11/20 3:12), mame (Yusuke Endoh) wrote:
> ko1, could you consider this issue towards next minor?
Sure.
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.