[#12443] Re: Tiny eRuby — Masatoshi SEKI <m_seki@...>
青山です。
[#12543] Ruby Conference 0.3 — greentea@...2.so-net.ne.jp (Tomoyuki Kosimizu)
こんにちは、こしみずです。
まつもと ゆきひろです
> | >18日あたり東京でRuby Conference 0.3(単なる宴会)を開きましょうか?
まつもと ゆきひろです
まつもと ゆきひろです
まつもと ゆきひろです
まつもと ゆきひろです
[#12546] [閑話] Ruby Conference 0.3 参加したいぃ — Atsuko Yoshida <atsuko@...>
こんにちは。あつこです。
松尾です。
さくです。
[#12573] alternative name of iterator — Shugo Maeda <shugo@...>
前田です。
まつもと ゆきひろです
moochan です.
まつもと ゆきひろです
moochan です.
まつもと ゆきひろです
moochan です.
まつもと ゆきひろです
moochan です.
まつもと ゆきひろです
前田です。
前田です。
わたなべです.
[#12590] kconv SJIS — Kikutani Makoto <kikutani@...>
=?ISO-2022-JP?B? ではじまるBエンコードされたサブジェクトは
Regard to "[ruby-list:12590] kconv SJIS"
On Sat, 6 Mar 1999 15:49:39 +0900,
kikutani> 出沢さんの base64_encodeモジュール最終版はどっかにありますか?
[#12623] Ruby 1.2.3 FreeBSD port — Yasuhiro Fukuma <yasuf@...>
福間@福岡 です。
[#12635] RE:UNIX USER 4/1999 — "Kozuka Masahiro" <kozuka@...>
こづかまさひろ@たきこうこうです。
[#12695] 第 2 回 OMG 分散コンピューティング・セミナー: CORBA3.0 の詳説と CORBA 活用の実際 — Junichi Suzuki <jun-sk@...>
各位.
前田です。
まつもと ゆきひろです
[#12707] Re: operater bind order ? — Inaba Hiroto <inaba@...>
稲葉です.
まつもと ゆきひろです
原です。
[#12727] Making of Interval class. — moochan <moochan@...>
moochan です.
moochan です.
昨日はRuby初心者でしたが、今日は超初心者の遠藤です。
前田です。
moochan です.
まつもと ゆきひろです
前田です。
まつもと ゆきひろです
前田です。
[#12728] Time + 1M — Wakou Aoyama <wakou@...>
青山です。
ふなばです。
五十嵐です。
ふなばです。
五十嵐です。
ふなばです。
まつもと ゆきひろです
ふなばです。
五十嵐です。
ふなばです。
[#12743] ftpmirror — Shugo Maeda <shugo@...>
前田です。
[#12756] Re: Making of Interval class. — moochan <moochan@...>
moochan です.
[#12827] ruby/tk for win32 — oshima@... (Mitsuru Oshima)
[#12835] XML developper day — Takaaki Higuchi - Technology Marketing <Takaaki.Higuchi@...>
なぜか参加してきましたので簡単に報告します。
[#12850] Ruby Conference 0.3 where ? when ? — ISII takesi <isii@...>
石井です。
まつもと ゆきひろです
松尾です。
まつもと ゆきひろです
松尾です。
まつもと ゆきひろです
松尾です。
まつもと ゆきひろです
なひです.
まつもと ゆきひろです
なひです.
まつもと ゆきひろです
なひです.
まつもと ゆきひろです
なひです.
なひです.
In message <36F0BAF925.577F.anakamur@exa.i-tech.co.jp>
In message <36F0F32B3.5781.anakamur@exa.i-tech.co.jp>
なひです.
なひです.
なひです.
なひです.
なひです.Ruby Conference #0.3以降ほったらかしてしまいました...
なひです.
わたなべです.
けいじゅ@日本ラショナルソフトウェアです.
けいじゅ@日本ラショナルソフトウェアです.
ごとけんです
まつもと ゆきひろです
ごとけんです
原です。
ごとけんです
原です。
さくです。
[#12876] Re: win32ole — 助田 雅紀 <masaki.suketa@...>
助田です.
[#12916] Thanks 出沢さん (mime.rb) — kikutani@...
快調です。ありがとうございました。
From: kikutani@sprintmail.com
出沢です
[#12918] Sieve of Eratosthenes (Re: [ruby-dev:6094]) — Shin-ichiro Hara <sinara@...>
原です。
まつもと ゆきひろです
原です。
まつもと ゆきひろです
原です。
まつもと ゆきひろです
まつもと ゆきひろです
原です。
原です。
原です。
[#12961] OS/2 support — OKUNISHI Fujikazu <fuji0924@...>
お初になります、奥西と申します。
[#12963] seqcmp.rb — sekita-n@... (Sekitani Nobutaka)
関谷@電通大です。
[#12967] profiler — "Kikutani, Makoto" <kikutani@...>
fj.comp.lang.ruby ではかわされてしまった気がする(^^)。
[#13000] Tiny eRuby — Masatoshi SEKI <m_seki@...>
[#13024] — Ryo HAYASAKA <hayasaka@...>
Subject weakref.rb exception (Re: HORB for Ruby?)
[#13063] Ruby Session in LinuxWorld Conference Japan — greentea@...2.so-net.ne.jp (Tomoyuki Kosimizu)
こんにちは、越水です。
[#13091] FAQ for /:|) — matz@... (Yukihiro Matsumoto)
まつもと ゆきひろです
なひです.
[#13121] 全角文字列の分割方法について — goto@...
初めまして、後藤@横河工事(橋梁技術者)です。
まつもと ゆきひろです
後藤@横河工事(橋梁技術者)です。お世話になります。
まつもと ゆきひろです
[#13134] ロックでアドバイスをいただきたいのですが — Keisuke Minami <keisuke@...>
はじめまして。三並と申します。
松尾です。
前田です。
松尾です。
[#13140] Ruby Conference 0.3 — hisanori@...
松尾です。
ごとけんです
松尾です。
なひです.
福間%環境復旧中@福岡 です。
なひです.
なひです.僕は馬鹿だ...
[#13162] Copy array (Re: 全角文字列の分割方法について) — Inaba Hiroto <inaba@...>
稲葉です.
[#13227] blade was down — Shin-ichiro Hara <sinara@...>
原です。
[#13246] smtp でメール発送用クラス — (Dezawa Shin-ichiro) <dezawa@...>
出沢です
[#13254] hash + — Kikutani Makoto <kikutani@...>
前にもこの話題はあった気がするけど...
[ruby-list:12955] Re: mutex_m.rb & sync.rb for 1.3
前田です。 matz@netlab.co.jp (Yukihiro Matsumoto) writes: > |mutex_m.rbとsync.rbを1.3系に対応させてみました。 > > sync.rbが壊れてるみたい.うちの問題なのかなあ. すいません、原因はわかりませんが圧縮せずに再送します。 # X-Dispatcherが怪しいような。 -- 前田 修吾
Attachments (1)
#
# sync.rb - 2 phase lock with counter
# $Release Version: 0.2$
# $Revision: 1.1.1.3.2.1 $
# $Date: 1999/02/09 06:08:24 $
# by Keiju ISHITSUKA
# modified by matz
#
# --
# Sync_m, Synchronizer_m
# Usage:
# obj.extend(Sync_m)
# or
# class Foo
# Sync_m.include_to self
# :
# end
#
# Sync_m#sync_mode
# Sync_m#sync_locked?, locked?
# Sync_m#sync_shared?, shared?
# Sync_m#sync_exclusive?, sync_exclusive?
# Sync_m#sync_try_lock, try_lock
# Sync_m#sync_lock, lock
# Sync_m#sync_unlock, unlock
#
# Sync, Synchronicer:
# include Sync_m
# Usage:
# sync = Sync.new
#
# Sync#mode
# Sync#locked?
# Sync#shared?
# Sync#exclusive?
# Sync#try_lock(mode) -- mode = :EX, :SH, :UN
# Sync#lock(mode) -- mode = :EX, :SH, :UN
# Sync#unlock
# Sync#synchronize(mode) {...}
#
#
unless defined? Thread
fail "Thread not available for this ruby interpreter"
end
module Sync_m
RCS_ID='-$Header: /home/cvsroot/ruby/lib/sync.rb,v 1.1.1.3.2.1 1999/02/09 06:08:24 matz Exp $-'
# lock mode
UN = :UN
SH = :SH
EX = :EX
# exceptions
class Err < StandardError
def Err.Fail(*opt)
fail self, sprintf(self::Message, *opt)
end
class UnknownLocker < Err
Message = "Thread(%s) not locked."
def UnknownLocker.Fail(th)
super(th.inspect)
end
end
class LockModeFailer < Err
Message = "Unknown lock mode(%s)"
def LockModeFailer.Fail(mode)
if mode.id2name
mode = id2name
end
super(mode)
end
end
end
def Sync_m.append_features(cl)
super
unless cl.instance_of?(Module)
# do nothing for Modules
# make aliases and include the proper module.
cl.module_eval %q{
alias locked? sync_locked?
alias shared? sync_shared?
alias exclusive? sync_exclusive?
alias lock sync_lock
alias unlock sync_unlock
alias try_lock sync_try_lock
alias synchronize sync_synchronize
}
end
return self
end
def Sync_m.extend_object(obj)
super
obj.sync_extended
end
def sync_extended
unless (defined? locked? and
defined? shared? and
defined? exclusive? and
defined? lock and
defined? unlock and
defined? try_lock and
defined? synchronize)
eval "class << self
alias locked? sync_locked?
alias shared? sync_shared?
alias exclusive? sync_exclusive?
alias lock sync_lock
alias unlock sync_unlock
alias try_lock sync_try_lock
alias synchronize sync_synchronize
end"
end
initialize
end
# accessing
def sync_locked?
sync_mode != UN
end
def sync_shared?
sync_mode == SH
end
def sync_exclusive?
sync_mode == EX
end
# locking methods.
def sync_try_lock(mode = EX)
return unlock if sync_mode == UN
Thread.critical = true
ret = sync_try_lock_sub(sync_mode)
Thread.critical = false
ret
end
def sync_lock(m = EX)
return unlock if m == UN
until (Thread.critical = true; sync_try_lock_sub(m))
if sync_sh_locker[Thread.current]
sync_upgrade_waiting.push [Thread.current, sync_sh_locker[Thread.current]]
sync_sh_locker.delete(Thread.current)
else
sync_waiting.push Thread.current
end
Thread.stop
end
Thread.critical = false
self
end
def sync_unlock(m = EX)
Thread.critical = true
if sync_mode == UN
Thread.critical = false
Err::UnknownLocker.Fail(Thread.current)
end
m = sync_mode if m == EX and sync_mode == SH
runnable = false
case m
when UN
Thread.critical = false
Err::UnknownLocker.Fail(Thread.current)
when EX
if sync_ex_locker == Thread.current
if (self.sync_ex_count = sync_ex_count - 1) == 0
self.sync_ex_locker = nil
if sync_sh_locker.include?(Thread.current)
self.sync_mode = SH
else
self.sync_mode = UN
end
runnable = true
end
else
Err::UnknownLocker.Fail(Thread.current)
end
when SH
if (count = sync_sh_locker[Thread.current]).nil?
Err::UnknownLocker.Fail(Thread.current)
else
if (sync_sh_locker[Thread.current] = count - 1) == 0
sync_sh_locker.delete(Thread.current)
if sync_sh_locker.empty? and sync_ex_count == 0
self.sync_mode = UN
runnable = true
end
end
end
end
if runnable
if sync_upgrade_waiting.size > 0
for k, v in sync_upgrade_waiting
sync_sh_locker[k] = v
end
wait = sync_upgrade_waiting
self.sync_upgrade_waiting = []
Thread.critical = false
for w, v in wait
w.run
end
else
wait = sync_waiting
self.sync_waiting = []
Thread.critical = false
for w in wait
w.run
end
end
end
Thread.critical = false
self
end
def sync_synchronize(mode = EX)
sync_lock(mode)
begin
yield
ensure
sync_unlock
end
end
attr :sync_mode, true
attr :sync_waiting, true
attr :sync_upgrade_waiting, true
attr :sync_sh_locker, true
attr :sync_ex_locker, true
attr :sync_ex_count, true
private
def initialize(*args)
ret = super
@sync_mode = UN
@sync_waiting = []
@sync_upgrade_waiting = []
@sync_sh_locker = Hash.new
@sync_ex_locker = nil
@sync_ex_count = 0
return ret
end
def sync_try_lock_sub(m)
case m
when SH
case sync_mode
when UN
self.sync_mode = m
sync_sh_locker[Thread.current] = 1
ret = true
when SH
count = 0 unless count = sync_sh_locker[Thread.current]
sync_sh_locker[Thread.current] = count + 1
ret = true
when EX
# in EX mode, lock will upgrade to EX lock
if sync_ex_locker == Thread.current
self.sync_ex_count = sync_ex_count + 1
ret = true
else
ret = false
end
end
when EX
if sync_mode == UN or
sync_mode == SH && sync_sh_locker.size == 1 && sync_sh_locker.include?(Thread.current)
self.sync_mode = m
self.sync_ex_locker = Thread.current
self.sync_ex_count = 1
ret = true
elsif sync_mode == EX && sync_ex_locker == Thread.current
self.sync_ex_count = sync_ex_count + 1
ret = true
else
ret = false
end
else
Thread.critical = false
Err::LockModeFailer.Fail mode
end
return ret
end
end
Synchronizer_m = Sync_m
class Sync
include Sync_m
private
def initialize
super
end
end
Synchronizer = Sync