On Wed, Aug 3, 2011 at 1:04 PM, Igor Stasenko <siguc...@gmail.com> wrote:

> it is pointless to spawn more than hardware can do, because these threads
> will just wait own turn to claim one of free cores and meanwhile just
> consume resources
>

I agree, with exceptions:
* blocking FFI calls
* FFI that uses thread local storage

We can handle common synchronous IO cases (files, sockets) more explicitly
in the implementation (futexes, etc.), but it is difficult to cover what an
FFI might do.

Some FFI libs - OpenGL, for example - use thread local storage for implicit
context between operations. Thus, developers must guarantee that a given
soft thread remains bound to a specific OS thread.

GHC Haskell provides special constructors (forkOS, forkOnIO) to support
these issues.


> IMO, high-granularity parallelism is road to nowhere.


Don't confuse threading with parallelism! Consider what we can do with SIMD,
DSP, and FPGA, for example.

BGB Wrote:

> another idle thought is if a language that already has dynamic scope
> actually needs TLS as well. the issue is that having both could be
> needlessly redundant.


If you have dynamic scope, you do not need TLS.
_______________________________________________
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc

Reply via email to