Threading example in FAQ 4.2 is slightly broken?

Hi all,

I just ran the example at the end of FAQ 4.2

http://www.rubycentral.com/faq/rubyfaq-4.html#ss4.2

The FAQ text says this produces:

onetwo: : 00

onetwo: : 11

onetwo: : 33

This confused me, so I ran the code and got:

one: 0
two: 0
one: 1
two: 1
one: 3
two: 3

which made more sense. OK, so thread scheduling is nondetermininistic
and there’s no mutual exclusion on stdout, so I can see how the output
given in the FAQ entry could happen - however, I think the version I
saw demonstrates the FAQ’s point more clearly.

Who should I tell about this? Raise a bug? Or is raising the alarm
hereabouts sufficient? :slight_smile:

Thanks,

-Andy

On 4/21/06, Andy G. [email protected] wrote:

one: 3
Thanks,

-Andy


Andy G.
Computer Science Department
University of Wales Swansea
http://www.cs.swan.ac.uk/~csandy/

Hmm why don’t you drop a mail to the FAQ maintainer mailto:
[email protected] ?
Personally I fail to see the point of the example but that might just be
because I am tired.
Hope that helps
Robert

Deux choses sont infinies : l’univers et la bêtise humaine ; en ce qui
concerne l’univers, je n’en ai pas acquis la certitude absolue.

  • Albert Einstein

Hi –

On Fri, 21 Apr 2006, Robert D. wrote:

onetwo: : 00
two: 1
Hmm why don’t you drop a mail to the FAQ maintainer mailto:
[email protected] ?

Actually the FAQ is now maintained at Ruby Garden:
http://www.rubygarden.org/faq. The old one, at rubycentral.com,
should connect you to the new one.

David


David A. Black ([email protected])
Ruby Power and Light, LLC (http://www.rubypowerandlight.com)

“Ruby for Rails” PDF now on sale! Ruby for Rails
Paper version coming in early May!

On Fri, Apr 21, 2006 at 08:22:51PM +0900, [email protected] wrote:

You may be looking at the old FAQ. Have a look at:

http://www.rubygarden.org/faq/entry/show/24

I think that’s the one you mean, and it looks OK.

Aha. Yes indeed.

In that case, there are two issues:

  1. Googling for “ruby faq” gives the old version as the top hit.

  2. I didn’t get redirected to the new version from the old version.

I’ll let Dave T. know. Thanks. :slight_smile:

-Andy

On 4/21/06, Andy G. [email protected] wrote:

In that case, there are two issues:

  1. Googling for “ruby faq” gives the old version as the top hit.

  2. I didn’t get redirected to the new version from the old version.

I’ll let Dave T. know. Thanks. :slight_smile:

-Andy

I think Hal F. is in charge of the FAQ now.

Curt

Hi –

On Fri, 21 Apr 2006, Andy G. wrote:

onetwo: : 11
two: 3

which made more sense. OK, so thread scheduling is nondetermininistic
and there’s no mutual exclusion on stdout, so I can see how the output
given in the FAQ entry could happen - however, I think the version I
saw demonstrates the FAQ’s point more clearly.

Who should I tell about this? Raise a bug? Or is raising the alarm
hereabouts sufficient? :slight_smile:

You may be looking at the old FAQ. Have a look at:

http://www.rubygarden.org/faq/entry/show/24

I think that’s the one you mean, and it looks OK.

David


David A. Black ([email protected])
Ruby Power and Light, LLC (http://www.rubypowerandlight.com)

“Ruby for Rails” PDF now on sale! Ruby for Rails
Paper version coming in early May!

On 4/21/06, Logan C. [email protected] wrote:

On Apr 21, 2006, at 8:53 AM, Curt H. wrote:

I think Hal F. is in charge of the FAQ now.

Curt

I believe Hal F. is in charge of the newsgroup/ML faq, not the
ruby faq.

There’s a newsgroup/ML faq? What’s the URL?

On 4/22/06, John G. [email protected] wrote:

There’s a newsgroup/ML faq? What’s the URL?

Whoops. Sorry. I guess this:
http://rubyhacker.com/clrFAQ.html
is it.

On Apr 21, 2006, at 8:53 AM, Curt H. wrote:

I think Hal F. is in charge of the FAQ now.

Curt

I believe Hal F. is in charge of the newsgroup/ML faq, not the
ruby faq.