Re: semaphores

2000-04-19 Thread Graham Barr
On Wed, Apr 19, 2000 at 10:21:53PM -0400, Joshua Pritikin wrote: > On Wed, Apr 19, 2000 at 11:52:28PM +0100, [EMAIL PROTECTED] wrote: > > On Wed, Apr 19, 2000 at 03:51:09PM -0400, Joshua Pritikin wrote: > > > On Wed, Apr 19, 2000 at 03:30:06PM -0400, Joshua N Pritikin wrote: > > > > Since no one r

Re: semaphores

2000-04-19 Thread Joshua N Pritikin
On Wed, Apr 19, 2000 at 11:52:28PM +0100, [EMAIL PROTECTED] wrote: > On Wed, Apr 19, 2000 at 03:51:09PM -0400, Joshua Pritikin wrote: > > On Wed, Apr 19, 2000 at 03:30:06PM -0400, Joshua N Pritikin wrote: > > > Since no one replied, I think I'm going to try POSIX semaphores. They > > > are "newer

Re: semaphores

2000-04-19 Thread Graham Barr
On Wed, Apr 19, 2000 at 03:51:09PM -0400, Joshua Pritikin wrote: > On Wed, Apr 19, 2000 at 03:30:06PM -0400, Joshua N Pritikin wrote: > > Since no one replied, I think I'm going to try POSIX semaphores. They > > are "newer" and "less complicate" according to Stevens. > > Oh, wait! Graham wrote

Re: semaphores

2000-04-19 Thread Joshua N Pritikin
On Wed, Apr 19, 2000 at 03:30:06PM -0400, Joshua N Pritikin wrote: > Since no one replied, I think I'm going to try POSIX semaphores. They > are "newer" and "less complicate" according to Stevens. Oh, wait! Graham wrote IPC::Semaphore way back in 1997... Hm. -- "May the best description of c

Re: semaphores

2000-04-19 Thread Joshua N Pritikin
On Wed, Apr 19, 2000 at 09:42:15AM -0400, Joshua N Pritikin wrote: > I am studying Stevens' IPC book. Does anyone know the pros & cons of > SysV vs. POSIX semaphores? I see that POSIX semaphores are "newer" than > SysV. My solaris 2.6 box supports both styles. Does linux express a > preference

Fwd: CPAN Upload: JPRIT/Event-0.74.tar.gz

2000-04-19 Thread Joshua N Pritikin
- Forwarded message from [EMAIL PROTECTED] - Date: Wed, 19 Apr 2000 18:59:24 +0200 Subject: CPAN Upload: JPRIT/Event-0.74.tar.gz From: [EMAIL PROTECTED] To: [EMAIL PROTECTED], [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] The uploaded file Event-0.74.tar.gz has entered CPAN as

Re: Question about Watcher Attributes

2000-04-19 Thread Joshua N Pritikin
On Wed, Apr 19, 2000 at 12:25:28PM -0400, [EMAIL PROTECTED] wrote: > JNP> Yes, that how it works either way. Hash assignment returns the new > JNP> value; the else branch would be redundent. > > but nik has a good point. i didn't think about the extra hash lookup. i > just hate extra else cl

Re: Question about Watcher Attributes

2000-04-19 Thread Uri Guttman
> "JNP" == Joshua N Pritikin <[EMAIL PROTECTED]> writes: JNP> if (@_) { JNP> $self->{$pkg} = shift JNP> } else { >> >> drop the else. accessors should always return the value whether freshly >> set or not. JNP> Yes, that how it works either way. Hash assignment returns the ne

Re: Question about Watcher Attributes

2000-04-19 Thread Joshua N Pritikin
On Wed, Apr 19, 2000 at 12:08:12PM -0400, [EMAIL PROTECTED] wrote: > > "JNP" == Joshua N Pritikin <[EMAIL PROTECTED]> writes: > > >> sub privateData > >> { > >> my $obj = shift; > >> my $key = shift || caller; > >> $obj->{$key} ||= {}; > >> } > > i am not sure of why the need for

Re: Question about Watcher Attributes

2000-04-19 Thread Nick Ing-Simmons
Uri Guttman <[EMAIL PROTECTED]> writes: >> "JNP" == Joshua N Pritikin <[EMAIL PROTECTED]> writes: > > >> sub privateData > >> { > >> my $obj = shift; > >> my $key = shift || caller; > >> $obj->{$key} ||= {}; > >> } > > >i am not sure of why the need for private data per caller. It was

Re: Question about Watcher Attributes

2000-04-19 Thread Uri Guttman
> "JNP" == Joshua N Pritikin <[EMAIL PROTECTED]> writes: >> sub privateData >> { >> my $obj = shift; >> my $key = shift || caller; >> $obj->{$key} ||= {}; >> } i am not sure of why the need for private data per caller. i used the data attribute in a global way when i wrote event

semaphores

2000-04-19 Thread Joshua N Pritikin
I am studying Stevens' IPC book. Does anyone know the pros & cons of SysV vs. POSIX semaphores? I see that POSIX semaphores are "newer" than SysV. My solaris 2.6 box supports both styles. Does linux express a preference? -- "May the best description of competition prevail." via, bu

Re: Question about Watcher Attributes

2000-04-19 Thread Joshua N Pritikin
On Wed, Apr 19, 2000 at 08:36:21AM +0100, [EMAIL PROTECTED] wrote: > Joshua N Pritikin <[EMAIL PROTECTED]> writes: > >Granted. Perhaps the thing to do is to document that data() should > >be reimplemented in every subclass to use a uniqueish key: > > Graham Barr came up with this for Tk: > > su

Re: Question about Watcher Attributes

2000-04-19 Thread Nick Ing-Simmons
Joshua N Pritikin <[EMAIL PROTECTED]> writes: > >Granted. Perhaps the thing to do is to document that data() should >be reimplemented in every subclass to use a uniqueish key: > > sub data { >my ($o, $data) = @_; >$o->{ __PACKAGE__ } = $data if @_ > 1; >$o->{ __PACKAGE__ } > } Grah