[Tutor] running multiple concurrent processes
wrw at mac.com
wrw at mac.com
Sun Nov 4 04:01:02 CET 2012
On Nov 3, 2012, at 9:36 PM, Oscar Benjamin <oscar.j.benjamin at gmail.com> wrote:
>
[byte]
>
>>
>> Bill, I appreciate your comment and have given it much thought, Ramit made
>> one much the same the other day. Here lies the potential problem, though it
>> might not be one at all, I need to do some experimenting. While I am a fan
>> of monolithic programming, I'm wondering if what I'm trying to do would work
>> on, say an old netbook. That might be a requirement. I'd prefer it not to
>> be, but it might. Also, thanks for reminding my addled old brain that event
>> driven is called interrupts. I knew that at one point, but seem to have
>> flushed it somehow.
>
> Who's Bill? Alan was referring to Twisted that is an event driven
> framework. Event driven or asynchronous processing is a third option
> (after threads or processes). The Twisted library is also capable of
> launching threads and (I think) processes for you so it could
> accommodate for all of the possibilities you want in one framework.
>
This Bill, and with apologies, - after some debate with myself I sent my comment to Richard without copying the list, since it was not relevant to either Threading or Multiprocessing - I simply pointed out that modern processors are so fast that he can probably accomplish what he wants to do by breaking his main subtasks into semi-atomic chunks and calling them round-robin.
It would require keeping careful track of some shared globals, but might be a MUCH simpler initial approach. Those sub tasks could be coalesced and converted to multiprocessing later after he gets going with the robot.
-Bill
More information about the Tutor
mailing list