Displaying 4 results from an estimated 4 matches for "protothreads".
2008 Jul 25
0
[LLVMdev] Erlang
...s. Could probably be quite a
> bit of copying, but if the guarantee is important, I'm guessing this
> is cheaper than tracking all pointers. I could easily be completely
> wrong.
>
I'll investigate on how that is achieved in Erlang, so I can ask more
precise questions.
I knew protothreads, but I still have to figure out the limitations
resulting from the fact that local variables are not preserved when
the protothread blocks. Is protothreads library able to keep a bunch
of living threads during program's life that exchange data through
message passing?
Thanks for your suggesti...
2008 Jul 25
4
[LLVMdev] Erlang
2008/7/24 Owen Anderson <resistor at mac.com>:
>> * They are isolated and the only way to exchange information is
>> message passing
>>
> This one is hard to guarantee in a compiled context, unless you
> implement a lot of stuff to track pointer values. Remember, all of
> these threads will be sharing an address space. If you want true
> protection, you'll
2008 Jul 24
0
[LLVMdev] Erlang
...ering on the way this could be achieved.
>
> What I know from microthreads are things like:
>
> * They don't have their own stack
> * Switching between threads is controlled by the application, not
> the OS
These two can be done in C pretty easily. Try googling for
"protothreads" for a library that implements this. To see how it
looks in LLVM, compile it down to bitcode and take a look.
> * They are isolated and the only way to exchange information is
> message passing
>
This one is hard to guarantee in a compiled context, unless you
implement a lot...
2008 Jul 24
2
[LLVMdev] Erlang
Hi,
Sorry for the vagueness.
I'm starting to think about an experimental programming language
based, among other things, on microthreads, or green threads, as
Erlang has. I'm still under a very vague stage, just thinking on it,
so I was wondering on the way this could be achieved.
What I know from microthreads are things like:
* They don't have their own stack
* Switching between