realtime design

Bengt Richter bokr at oz.net
Wed Oct 16 14:23:31 CEST 2002


On 16 Oct 2002 00:28:35 -0700, hwlgw at hotmail.com (Will Stuyvesant) wrote:

>> [Greg Ewing]
>> > Will Stuyvesant wrote:
>> >
>> > But if the
>> > function call winds up doing cpu intensive stuff (for example
>> > pow()) at the C level then the Python threading timeout fails
>> > 
>> > ...
>> > 
>> > Performance is no issue, the
>> > simulation is allowed to be very slow, as long as it does
>> > implement the primitive correctly. 
>> 
>> In that case, just don't do anything intensive in C!
>> Keep it all in pure Python.
>
>I did hope that would be a reliable solution.  But alas it is not:
>doing something like ``x = 2L * 2L * 32'' will send control to the C
>level for too long.  For ordinary purposes it may not be much of a
>problem.  But for a realtime simulator...
>
It sounds a bit funny to me to be worrying about "too long" (presumably
_real_ time?) in a realtime *simulator* (especially after saying performance
is no issue). I guess you're not simulating time itself in your realtime simulator?

(I probably missed something, jumping in just on this post ;-)
Regards,
Bengt Richter



More information about the Python-list mailing list