Erlang (was: Re: Generics)

Eric Merritt cyberlync at yahoo.com
Mon Nov 10 23:43:34 UTC 2003


> 
> 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 realize that, but if you have an extra process
handling the thread priorities you need someway to
make the premption fair. For example in either erlang
or mozart-oz (I forget which) preemption happens after
500 reductions. In other langauges its so many byte
codes or so many message sends. Its all just a scheme
to make sure processes all get a equal share of the
processor.
 
> I don't know why you'd need anything fancier than
> that for experimenting with.

 For experimenting a time slice would work well
enough.

> Just override #doesNotUnderstand: to do whatever you
> want.

 I was thinking more along the lines of going ahead
and providing a nice little set of classes to handle
this in general. Then you could just subclass
'ActiveObject' and automatically have a safe
concurrent object. Of course, if I used
#doesNotUnderstand for managing the mailbox they would
have to name thier methods something else I guess
maybe a leading underscore or something. 
 
> 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:

 Yea, I was looking at it earlier. There is not much
to work with there.
> 
> ==
> become:
> cannotInterpret:
> doOnlyOnce:
> doesNotUnderstand:
> flag:
> identityHash
> ifNil:
> ifNil:ifNotNil:
> ifNotNil:
> ifNotNil:ifNil:
> isInMemory
> isNil
> nextInstance
> nextObject
> pointsTo:
> rearmOneShot
> rehash
> ~~
> 
> 


__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree



More information about the Squeak-dev mailing list