Alex Rivera | Logout

Python, Ruby, Haskell - Do they provide true multithreading?

Asked 2009-12-17T10:33:03.657
16

We are planning to write a highly concurrent application in any of the Very-High Level programming languages.

1) Do Python, Ruby, or Haskell support true multithreading?

2) If a program contains threads, will a Virtual Machine automatically assign work to multiple cores (or to physical CPUs if there is more than 1 CPU on the mainboard)?

True multithreading = multiple independent threads of execution utilize the resources provided by multiple cores (not by only 1 core).

False multithreading = threads emulate multithreaded environments without relying on any native OS capabilities.

Edit
Report

2 Answers

1

Haskell is thread-capable, in addition you get pure functional language - no side effects

answered 2009-12-17T10:36:17.617
1

I second the choice of Erlang. Erlang can support distributed highly concurrent programming out of the box. Does not matter whether you callit "multi-threading" or "multi-processing". Two important elements to consider are the level of concurrency and the fact that Erlang processes do not share state.

No shared state among processes is a good thing.

answered 2009-12-17T12:59:41.903

Your Answer