-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* array.c (rb_ary_and): should not push frozen key string.
* array.c (rb_ary_or): ditto. * eval.c (rb_thread_schedule): should save context before raising deadlock, saved context for current thread might be obsolete. * time.c (make_time_t): non DST timezone shift supported (hopefully). * time.c (make_time_t): strict range detection for negative time_t. * signal.c: SIGINFO added. * eval.c (rb_ensure): should not SEGV when prot_tag is NULL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
- Loading branch information
matz
committed
May 16, 2001
1 parent
59d82a9
commit f84f4aa
Showing
20 changed files
with
139 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,26 @@ | ||
Tue May 15 17:46:37 2001 Yukihiro Matsumoto <[email protected]> | ||
|
||
* array.c (rb_ary_and): should not push frozen key string. | ||
|
||
* array.c (rb_ary_or): ditto. | ||
|
||
Mon May 14 13:50:22 2001 Yukihiro Matsumoto <[email protected]> | ||
|
||
* eval.c (rb_thread_schedule): should save context before raising | ||
deadlock, saved context for current thread might be obsolete. | ||
|
||
* time.c (make_time_t): non DST timezone shift supported (hopefully). | ||
|
||
* time.c (make_time_t): strict range detection for negative time_t. | ||
|
||
Mon May 14 11:54:20 2001 Tanaka Akira <[email protected]> | ||
|
||
* signal.c: SIGINFO added. | ||
|
||
Mon May 14 08:57:06 2001 Yukihiro Matsumoto <[email protected]> | ||
|
||
* eval.c (rb_ensure): should not SEGV when prot_tag is NULL. | ||
|
||
Sun May 13 23:51:14 2001 Usaku Nakamura <[email protected]> | ||
|
||
* win32/resource.rb: Modify copyright in resource script. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,7 @@ def popen3(*cmd) | |
|
||
exec(*cmd) | ||
} | ||
exit! | ||
} | ||
|
||
pw[0].close | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
# $Date$ | ||
# by Yukihiro Matsumoto <[email protected]> | ||
# | ||
# Copyright (C) 2001 Yukihiro Matsumoto | ||
# Copyright (C) 2000 Network Applied Communication Laboratory, Inc. | ||
# Copyright (C) 2000 Information-technology Promotion Agency, Japan | ||
# | ||
|
@@ -74,7 +75,10 @@ def unlock | |
retry | ||
end | ||
Thread.critical = false | ||
t.run if t | ||
begin | ||
t.run if t | ||
rescue ThreadError | ||
end | ||
self | ||
end | ||
|
||
|
@@ -160,17 +164,19 @@ def push(obj) | |
ensure | ||
Thread.critical = false | ||
end | ||
t.run if t | ||
end | ||
def enq(obj) | ||
push(obj) | ||
begin | ||
t.run if t | ||
rescue ThreadError | ||
end | ||
end | ||
alias << push | ||
alias enq push | ||
|
||
def pop(non_block=false) | ||
Thread.critical = true | ||
begin | ||
loop do | ||
if @que.length == 0 | ||
if @que.empty? | ||
if non_block | ||
raise ThreadError, "queue empty" | ||
end | ||
|
@@ -184,17 +190,15 @@ def pop(non_block=false) | |
Thread.critical = false | ||
end | ||
end | ||
def shift(non_block=false) | ||
pop(non_block) | ||
end | ||
alias deq shift | ||
alias shift pop | ||
alias deq pop | ||
|
||
def empty? | ||
@que.length == 0 | ||
@que.empty? | ||
end | ||
|
||
def clear | ||
@que.replace([]) | ||
@que.clear | ||
end | ||
|
||
def length | ||
|
@@ -223,7 +227,7 @@ def max | |
|
||
def max=(max) | ||
Thread.critical = true | ||
if max >= @max | ||
if max <= @max | ||
@max = max | ||
Thread.critical = false | ||
else | ||
|
@@ -251,8 +255,10 @@ def push(obj) | |
end | ||
super | ||
end | ||
alias << push | ||
|
||
def pop(*args) | ||
retval = super | ||
Thread.critical = true | ||
if @que.length < @max | ||
begin | ||
|
@@ -263,9 +269,12 @@ def pop(*args) | |
ensure | ||
Thread.critical = false | ||
end | ||
t.run if t | ||
begin | ||
t.run if t | ||
rescue ThreadError | ||
end | ||
end | ||
super | ||
retval | ||
end | ||
|
||
def num_waiting | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.