[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: anyone know the answer to this one?
- From: lhf@... (Luiz Henrique de Figueiredo)
- Date: Wed, 14 Oct 1998 21:45:46 -0200 (EDT)
>From: Steve Dekorte <email@example.com>
>firstname.lastname@example.org (Luiz Henrique de Figueiredo) wrote:
>> >> Jim Mathies <Jim@mathies.com> wrote:
>> >> > Do you know of any way to interrupt the running VM by making a call
>> >> > into it while a separate thread is executing a program?
>> You may try to set the call hook and then call error inside it.
>> I think this will interrupt the current chunk.
>That's very slow, isn't it?
Well, depends on what you call "slow".
As a programmer, I understand this "concern". But we're talking here about an
interpreted language (even if it's one of the fastest around). My point is that,
in any interpreted language, the VM simulation is by far the slowest part of
the code, to the point that the mere loop overhead is comparable to most
opcodes. So, how slow is slow?
Someone else suggested adding a flag to the global state. It's a good solution.
but requires changing the official code.
Now, this too will be "slow": merely checking this flag will be comparable to
Bottom line: try it and see if it's slow in your applications.