----- Forwarded message from [EMAIL PROTECTED] -----
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED],
[EMAIL PROTECTED]
The uploaded file
Event-0.60.tar.gz
has entered CPAN as
file: $CPAN/authors/id/JPRIT/Event-0.60.tar.gz
size: 61297 bytes
md5: 3fb2eb7ea6d428d3bff4253e09e59834
No action is required on your part
Request entered by: JPRIT (Joshua N. Pritikin)
Request entered on: Wed, 26 Jan 2000 18:01:26 GMT
Request completed: Wed, 26 Jan 2000 18:01:58 GMT
Virtually Yours,
Id: paused,v 1.68 1999/10/22 14:39:12 k Exp k
----- End forwarded message -----
# This is a patch for Event-0.59 to update it to Event-0.60
#
# To apply this patch:
# STEP 1: Chdir to the source directory.
# STEP 2: Run the 'applypatch' program with this patch file as input.
#
# If you do not have 'applypatch', it is part of the 'makepatch' package
# that you can fetch from the Comprehensive Perl Archive Network:
# http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
# In the above URL, 'x' should be 2 or higher.
#
# To apply this patch without the use of 'applypatch':
# STEP 1: Chdir to the source directory.
# STEP 2: Run the 'patch' program with this file as input.
#
#### End of Preamble ####
#### Patch data follows ####
gdiff -up '/usr/tmp/mp6725.d/old/Event-0.59/ChangeLog'
'/usr/tmp/mp6725.d/new/Event-0.60/ChangeLog'
Index: ./ChangeLog
--- ./ChangeLog Thu Jan 20 10:30:41 2000
+++ ./ChangeLog Wed Jan 26 12:47:47 2000
@@ -1,4 +1,14 @@
+2000-01-26 Joshua Pritikin <[EMAIL PROTECTED]>
+
+ * Release 0.60.
+
+ * Added $watcher->data() attribute. (This is Uri Guttman
+ <[EMAIL PROTECTED]>'s fault.)
+
2000-01-20 Joshua Pritikin <[EMAIL PROTECTED]>
+
+ * Fixed refcnt problem caused by extra invocations of cancel()
+ (Discovered by [EMAIL PROTECTED]) Added test.
* Release 0.59.
gdiff -up '/usr/tmp/mp6725.d/old/Event-0.59/TODO'
'/usr/tmp/mp6725.d/new/Event-0.60/TODO'
Index: ./TODO
--- ./TODO Thu Jan 20 10:05:56 2000
+++ ./TODO Wed Jan 26 11:18:18 2000
@@ -1,3 +1,9 @@
+don't invoke start method in the constructor: parked => 1 ?
+
+increase the number of priority levels?
+ ASYNC 0 1 2 3 4 5 6 7 8 9 IDLE
+ HIGH NORM
+
rethink
pe_check_recovery & ENTER/LEAVE points
@@ -6,6 +12,7 @@ find owner for Win32 port
documentation
how to design new event types (in perl)
how to design new event types (in C)??
+ distinguish between attributes and constructor attributes
optimization
update io event-mask without invalidating cache
gdiff -up '/usr/tmp/mp6725.d/old/Event-0.59/c/typemap.c'
'/usr/tmp/mp6725.d/new/Event-0.60/c/typemap.c'
Index: ./c/typemap.c
--- ./c/typemap.c Wed Jan 19 11:01:14 2000
+++ ./c/typemap.c Thu Jan 20 13:50:53 2000
@@ -33,8 +33,14 @@ static SV *wrap_watcher(void *ptr, HV *s
static SV *watcher_2sv(pe_watcher *wa) { /**SLOW IS OKAY**/
assert(!WaDESTROYED(wa));
- if (!wa->mysv)
+ if (!wa->mysv) {
wa->mysv = wrap_watcher(wa, wa->vtbl->stash, 0);
+ if (WaDEBUGx(wa) >= 4) {
+ STRLEN n_a;
+ warn("Watcher=0x%x '%s' wrapped with SV=0x%x",
+ wa, SvPV(wa->desc, n_a), SvRV(wa->mysv));
+ }
+ }
return SvREFCNT_inc(sv_2mortal(wa->mysv));
}
@@ -67,7 +73,7 @@ static SV *event_2sv(pe_event *ev) { /**
sv_setiv(sv, (IV)ev);
ev->mysv = rv;
- if (WaDEBUGx(ev) >= 4) {
+ if (WaDEBUGx(ev->up) >= 4) {
STRLEN n_a;
warn("Event=0x%x '%s' wrapped with SV=0x%x",
ev, SvPV(ev->up->desc, n_a), SvRV(ev->mysv));
gdiff -up '/usr/tmp/mp6725.d/old/Event-0.59/c/watcher.c'
'/usr/tmp/mp6725.d/new/Event-0.60/c/watcher.c'
Index: ./c/watcher.c
--- ./c/watcher.c Wed Jan 19 16:51:41 2000
+++ ./c/watcher.c Thu Jan 20 14:08:59 2000
@@ -279,12 +279,14 @@ static void pe_watcher_now(pe_watcher *w
*/
static void pe_watcher_cancel(pe_watcher *wa) {
+ if (WaCANCELLED(wa))
+ return;
WaSUSPEND_off(wa);
pe_watcher_stop(wa, 1); /* peer */
WaCANCELLED_on(wa);
PE_RING_DETACH(&wa->all);
if (wa->mysv)
- SvREFCNT_dec(wa->mysv); /* might destroy */
+ SvREFCNT_dec(wa->mysv); /* might destroy */
else if (WaCANDESTROY(wa))
(*wa->vtbl->dtor)(wa);
}
gdiff -up '/usr/tmp/mp6725.d/old/Event-0.59/lib/Event.pm'
'/usr/tmp/mp6725.d/new/Event-0.60/lib/Event.pm'
Index: ./lib/Event.pm
--- ./lib/Event.pm Thu Jan 20 10:29:07 2000
+++ ./lib/Event.pm Wed Jan 26 12:45:35 2000
@@ -13,7 +13,7 @@ use Carp;
eval { require Carp::Heavy; }; # work around perl_call_pv bug XXX
use vars qw($VERSION @EXPORT_OK
$API $DebugLevel $Eval $DIED $Now);
-$VERSION = '0.59';
+$VERSION = '0.60';
# If we inherit DynaLoader then we inherit AutoLoader; Bletch!
require DynaLoader;
gdiff -up '/usr/tmp/mp6725.d/old/Event-0.59/lib/Event.pod'
'/usr/tmp/mp6725.d/new/Event-0.60/lib/Event.pod'
Index: ./lib/Event.pod
--- ./lib/Event.pod Wed Jan 19 10:24:02 2000
+++ ./lib/Event.pod Wed Jan 26 11:11:19 2000
@@ -97,6 +97,10 @@ customized by passing extra attributes t
created, watcher objects are "started" and are waiting for events
(see C<$event-E<gt>start> below).
+L<NetServer::ProcessTop> displays watchers in real-time, formatted
+similarly to the popular C<top> program. You may find this a useful
+aide for debugging.
+
=head2 Shared Watcher Attributes
Watchers are configured with attributes (also known as properties).
@@ -313,9 +317,9 @@ Similar to a C<timeout>.
=item max_cb_tm => $seconds
-The maximum number of seconds to spend in the callback. If the
-callback uses more time then it is aborted. Defaults to 1 sec. This
-feature is normally disabled. See L<Event::Stats>.
+The maximum number of seconds to spend in a callback. If a callback
+uses more time then it is aborted. Defaults to 1 sec. This feature
+is normally disabled. See L<Event::Stats>.
=item min => $seconds
@@ -588,7 +592,7 @@ those lists below and folks mentioned in
=head1 COPYRIGHT
-Copyright � 1997-1999 Joshua Nathaniel Pritikin & Graham Barr. All
+Copyright � 1997-2000 Joshua Nathaniel Pritikin & Graham Barr. All
rights reserved. This program is free software; you can redistribute
it and/or modify it under the same terms as Perl itself.
gdiff -up '/usr/tmp/mp6725.d/old/Event-0.59/lib/Event/Watcher.pm'
'/usr/tmp/mp6725.d/new/Event-0.60/lib/Event/Watcher.pm'
Index: ./lib/Event/Watcher.pm
--- ./lib/Event/Watcher.pm Wed Dec 22 17:00:07 1999
+++ ./lib/Event/Watcher.pm Wed Jan 26 12:45:18 2000
@@ -94,6 +94,12 @@ sub configure {
}
}
+sub data { # assumes $self is a HASH ref
+ my $self = shift;
+ $self->{Event_data} = shift if @_;
+ $self->{Event_data};
+}
+
sub clump {
require Carp;
Carp::cluck "clump is deprecated";
gdiff -up '/usr/tmp/mp6725.d/old/Event-0.59/t/leak.t'
'/usr/tmp/mp6725.d/new/Event-0.60/t/leak.t'
Index: ./t/leak.t
--- ./t/leak.t Wed Jan 19 11:04:27 2000
+++ ./t/leak.t Thu Jan 20 14:04:07 2000
@@ -1,5 +1,5 @@
# leak -*-perl-*-
-use Test; plan test => 3;
+use Test; plan test => 4;
use Event qw(all_watchers);
my @e = Event::all_watchers();
@@ -19,3 +19,9 @@ for (1..2) { thrash(); }
my $got = join(', ', map { ref } all_watchers()) || 'None';
ok($got, 'None');
+
+{
+ my $io = Event->io();
+ $io->cancel for 1..3; #shouldn't crash!
+ ok 1;
+}
#### End of Patch data ####
#### ApplyPatch data follows ####
# Data version : 1.0
# Date generated : Wed Jan 26 12:59:00 2000
# Generated by : makepatch 2.00 (2.0BETA)
# Recurse directories : Yes
# p 'ChangeLog' 20130 948908867 0100444
# p 'TODO' 1179 948903498 0100444
# p 'c/typemap.c' 3651 948394253 0100444
# p 'c/watcher.c' 8588 948395339 0100444
# p 'lib/Event.pm' 4159 948908735 0100444
# p 'lib/Event.pod' 19053 948903079 0100444
# p 'lib/Event/Watcher.pm' 2200 948908718 0100444
# p 't/leak.t' 457 948395047 0100444
#### End of ApplyPatch data ####
#### End of Patch kit [created: Wed Jan 26 12:59:00 2000] ####
#### Checksum: 214 7302 32780 ####
--
"Does `competition' have an abstract purpose?"
via, but not speaking for Deutsche Bank