Recompiling a method while it's on the stack

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Recompiling a method while it's on the stack

Rob Hoelz
Hello Smalltalkers,

Kind of a thought experiment here, but is the behavior for recompiling a
method while it's on the stack defined?  For example:

Object subclass: Foo [
  foo [
    Transcript print: 1; cr.
    reloadSource.
    Transcript print: 2; cr.
  ]

  reloadSource [
    FileStream fileIn: 'test.st'.
  ]
]

|f|

f := Foo new.
f foo.

I ran this, but did kind of an infinite loop thing.  Is this a bug, or
is something like this supposed to happen?

Thanks,
Rob Hoelz


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Recompiling a method while it's on the stack

Rob Hoelz
Rob Hoelz <[hidden email]> wrote:

> Hello Smalltalkers,
>
> Kind of a thought experiment here, but is the behavior for
> recompiling a method while it's on the stack defined?  For example:
>
> Object subclass: Foo [
>   foo [
>     Transcript print: 1; cr.
>     reloadSource.
>     Transcript print: 2; cr.
>   ]
>
>   reloadSource [
>     FileStream fileIn: 'test.st'.
>   ]
> ]
>
> |f|
>
> f := Foo new.
> f foo.
>
> I ran this, but did kind of an infinite loop thing.  Is this a bug, or
> is something like this supposed to happen?
>
> Thanks,
> Rob Hoelz
>

Nevermind...I need to look at my code a little more closely...


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk