Does this work in 4.0?

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

Does this work in 4.0?

Geoff
The following snippet shows a bug in Dolphin 3.06.  Has it been fixed in
Dolphin 4.0?  If anyone has 4.0, would you please execute the following code
in a workspace and report what it does.  If it works correctly, it should
just run for a fraction of a second and do nothing.  It's basically a test of
Dolphin's ability to run 50 processes simultaneously, while each of them
spends most of its time sleeping.  (50 1-millisecond sleeps per process, with
all of the processes sleeping in parallel, for a total of slightly more than
50 milliseconds for the whole test.)  If the bug happens, it will take a long
time, and you will want to interrupt it with Ctrl-Break.

        | procs |
        procs := OrderedCollection new.
        50 timesRepeat: [
                procs add: [
                        50 timesRepeat: [Processor sleep: 1].
                ] fork.
        ].
        procs do: [:proc |  proc terminate].
        Processor sleep: 100.
        Processor sleep: 100.


Reply | Threaded
Open this post in threaded view
|

Re: Does this work in 4.0?

Ian Bartholomew-3
> The following snippet shows a bug in Dolphin 3.06.  Has it been fixed in
> Dolphin 4.0?  If anyone has 4.0, would you please execute the following
code
> in a workspace and report what it does.

Still fails in 4.0. FWIW, if you make the loop blocks sleep for 2 mS it
works fine.

Ina


Reply | Threaded
Open this post in threaded view
|

Re: Does this work in 4.0?

Andy Bower
In reply to this post by Geoff
E455,

It *does* appear to happen in Dolphin 4. We'll take a look at why that is.
Is this an instance of some real word problem or just an obscure benchmark?
If the former, it will obviously warrant more attention than the latter.

I notice, though, that it is only a problem if you forcibly try to terminate
the waiting processes. Evaluating:

procs := OrderedCollection new.
50 timesRepeat: [
 procs add: [
  50 timesRepeat: [Processor sleep: 1]] fork ].
Processor sleep: 100.
Processor sleep: 100.

works as expected.

Best regards,

Andy Bower
Dolphin Support
http://www.object-arts.com

---
Visit the Dolphin Smalltalk Wiki Web
http://www.object-arts.com/wiki/html/Dolphin/FrontPage.htm
---

" e 4 5 5 @ y a h o o . c o m " <[hidden email]> wrote in message
news:[hidden email]...
> The following snippet shows a bug in Dolphin 3.06.  Has it been fixed in
> Dolphin 4.0?  If anyone has 4.0, would you please execute the following
code
> in a workspace and report what it does.  If it works correctly, it should
> just run for a fraction of a second and do nothing.  It's basically a test
of
> Dolphin's ability to run 50 processes simultaneously, while each of them
> spends most of its time sleeping.  (50 1-millisecond sleeps per process,
with
> all of the processes sleeping in parallel, for a total of slightly more
than
> 50 milliseconds for the whole test.)  If the bug happens, it will take a
long

> time, and you will want to interrupt it with Ctrl-Break.
>
> | procs |
> procs := OrderedCollection new.
> 50 timesRepeat: [
> procs add: [
> 50 timesRepeat: [Processor sleep: 1].
> ] fork.
> ].
> procs do: [:proc |  proc terminate].
> Processor sleep: 100.
> Processor sleep: 100.
>