Erlang (was: Re: Generics)
Ned Konz
ned at bike-nomad.com
Mon Nov 10 23:23:26 UTC 2003
On Monday 10 November 2003 2:03 pm, Eric Merritt wrote:
> There would probably be a number of things to base
> preembtion on. In erlang, I believe they base it on
> the number of reductions, they may do the same thing
> in mozart. You could also base it on some arbitrary
> length of time as well. In fact, if the vm doesn't
> collect some runtime stats this may be the only thing
> to use. Does the vm collect any of these type of
> stats?
I don't recall. The preemption is pretty simple: if there's a higher priority
process that's ready to run when the VM checks, the current process gets
suspended. Which puts it at the end of the list for that priority.
I don't know why you'd need anything fancier than that for experimenting with.
> > That's easy to provide in Squeak as well. It's just
> > that (because some
> > platforms may not support async files) we don't use
> > it by default.
>
> Hmm, I may have to look into this too.
>
> Overall it looks like it may not be to hard to provide
> an 'Active Objects' (as mozart-oz calls them) in
> squeak. I need to look deeper into the protoobject to
> see how method dispatching can be preempted.
Just override #doesNotUnderstand: to do whatever you want.
ProtoObject doesn't have much of an interface; and if you're subclassing it
you could override (some of the) potentially troublesome methods (I suspect
some will have to stay):
Here's what it provides:
==
become:
cannotInterpret:
doOnlyOnce:
doesNotUnderstand:
flag:
identityHash
ifNil:
ifNil:ifNotNil:
ifNotNil:
ifNotNil:ifNil:
isInMemory
isNil
nextInstance
nextObject
pointsTo:
rearmOneShot
rehash
~~
--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE
More information about the Squeak-dev
mailing list
|