[Stackless] Concurreny Models In Stackless

Andrew Francis andrewfr_ice at yahoo.com
Tue May 16 19:26:49 CEST 2006


Hello Grant:

>This reasonably simulates pure message-passing, but I
>honestly don't know what I'm gaining here, other than
>being able to say I'm using message-passing
>concurrency.  

Message passing is a simple and powerful model. One
can build more complex mechanisms using the simple
message passing mechanisms. For example, one can
implement synchronizers close to the ones described in
chapter 16 of Nancy Lynch's "Distributed Algorithms." 

>It also seems like the risk of sharing 
>objects across tasklets it mitigated by the fact that
>stackless uses a co-operative threading model.  In
>this case you don't need to worry about things 
>like mutexes as much as you would in traditional
>shared-memory concurrency

Perhaps but I don't think it eliminates the need for
the set_atomic method. Simple case, multiple tasklets
enter a "critical section." The critical section makes
a call to channel or schedule(), anything that would
cause the tasklets in the critical section to be
otherwise re-scheduled and causing a race condition.

Since I care about safety first, I use set_atomic to
guard shared data structures, as opposed to depending
on cooperative scheduling.

Cheers,
Andrew


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless



More information about the Stackless mailing list