[newbie question] critical sections
Peter Novak
pno at whitestein.com
Wed Jul 14 15:50:02 UTC 1999
Bob Arning wrote:
>
> On Wed, 14 Jul 1999 12:00:44 +0100 "Peter Novak" <pno at whitestein.com> wrote:
> >sometimes I need to have a breakpoint in some critical section of code. For
> >example in method at: ifAbsent: in SystemDictionary (Dictionary), or in some
> >method in class Class (like is scopehas: ifTrue:). I think that it's clear
> >that it's a madness to do something like this, because every time I tried to
> >evaluate something (anything), the system crashed, or went into the
> >unuseable state.
>
> Some ideas: 1) have the debugging code be very selective about when
> it happens (just once, e.g. or only when certain peculiar conditions
> exist), 2) have it do something
> simple like add an element to an OrderedCollection instead of halting
> and 3) be prepared for things to crash - file out the pertinent code
> just before you make the last connection so you don't have to reinvent
> everything the next time.
Thans. It seems to me to be a better idea to add an element to a
Collection
than "Smalltalk halt".
>
> ...
>
> >And I have another question. How is possible to recompile class
> >SystemDictionary (exactly if I want to add method at: ifAbsent: to class
> >SystemDictionary) ??? It is little bit dangerous to make such things, but I
> >need it.
>
> Adding a method does not cause the class to be recompiled. Adding
>an instance _variable_ does.
>
> >So I think that you, old smalltalkers, have maybe some methods to go around
> >these problems. Can someone give me an advice??? Or in another form: How can
> >I safely rewrite some of kernel classes of Smalltalk???
> >
>
> A more specific example would help here (privately, perhaps, given
>the current level of discussion on the list).
Okay. Exactly I tried to add a class X. It's superclass was Dictionary
and one of
its subclasses was SystemDictionary. Class SystemDictionary automaticaly
recompiles
when I try to change its superclass. Everything could be okay, but class
X had defined
method at: ifAbsent: which is used by Smalltalk (uses at: ifAbsent: from
class
Dictionary). This is my problem and reason for searching for someone who
os able
to solve my problem faster than me ;).
peter.
Content-Type: text/x-vcard; charset=us-ascii;
name="pno.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Peter Novak
Content-Disposition: attachment;
filename="pno.vcf"
Attachment converted: Anon:pno.vcf 4 (TEXT/R*ch) (0000B347)
More information about the Squeak-dev
mailing list
|