<b><i>Richard Tew &lt;richard.m.tew@gmail.com&gt;</i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> On 10/18/07, Allen Fowler <allen.fowler@yahoo.com> wrote:<br>&gt; Is there any (near-term) hope to fix the common case of trying to easily get<br>&gt; more than one CPU core in a single physical machine to process tasklets?<br><br>No.  Not by anyone I can name on this list.  But if you want it, I<br>encourage you to give it a shot.  Most of the things people post about<br>wanting to this mailing list, they could probably write themselves if<br>they set themselves to it rather than to posting.<br><br></allen.fowler@yahoo.com></blockquote><allen.fowler@yahoo.com></allen.fowler@yahoo.com><br>I suppose you are correct.&nbsp; However, as a python newbie, if I knew how to do this, I probably would not have posted here the first place. <br><br>Frankly, I am not sure I know what a "thread" really
 is.<br><br>I get the idea that a "process" has it's own slab of memory space it to which program code (and variables) are loaded.<br><br>As I understand it, the CPU then runs through the slab of memory executing instructions.&nbsp; (jmp-ing around inside as the code dictates. )<br><br>Now, threads supposedly "share a memory space".&nbsp; In my simplistic view of things, I don't see how that could work.<br><br>I mean variables would be changing under-foot at all times as other threads do their thing. (?!)<br><br>How could you even make something simple as a c-style for loop?&nbsp; The index variable would be clobbered by the other thread running the same code.<br><br>But, obviously, it is do-able.&nbsp; I just don't see how.<br><br><allen.fowler@yahoo.com></allen.fowler@yahoo.com><blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><allen.fowler@yahoo.com><br>Put a Stackless Python interpreter on each core.  Make
 aware of each<br>other.  Then pickle the tasklets you  want to move to other cores, and<br>send them there.  Do the same across sockets to other cores on other<br>computers on the network.  There are some technical issues involved in<br>which tasklets can be pickled in this way, but finding out what they<br>are is half the fun.<br><br></allen.fowler@yahoo.com></blockquote><allen.fowler@yahoo.com></allen.fowler@yahoo.com><br>IPC is complex. IPC is slow. IPC is hard.<br><br>IPC (and concurrency) has already been figured out by many smart people. (MPI,Spread,etc.)<br><br>IPC seems like an overkill for my laptop's dual-core CPU.<br><br>I really don't want to fork/spawn/whatever a 2nd/3rd/4th 100MB+ Python process.<br><allen.fowler@yahoo.com></allen.fowler@yahoo.com><blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><allen.fowler@yahoo.com><br><br>&gt; It would be a huge boon to me, and i'm sure many
 others.<br><br>Then I hope you will find value in giving it a shot.<br><br></allen.fowler@yahoo.com></blockquote><allen.fowler@yahoo.com></allen.fowler@yahoo.com><br><allen.fowler@yahoo.com></allen.fowler@yahoo.com>I'd like to, however I'd first need&nbsp; to understand how plain-old Threads work.<br><br>Then I'd need to understand how CPython works.<br><br>Then, I'd need to comprehend what exactly stackless is doing inside CPython.<br><br>All this being hampered by a near-zero knowledge of C.<br><br>And at the end, I have no guarantee that any of this is actually possible to do in a performance-sane way.<br><br><img src="http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/06.gif"><br><br><br><p>&#32;__________________________________________________<br>Do You Yahoo!?<br>Tired of spam?  Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com