realtime design

Aahz aahz at
Tue Oct 15 19:23:07 CEST 2002

In article <cb035744.0210150744.1fecaa54 at>,
Will Stuyvesant <hwlgw at> wrote:
>Well as you can see in this thread I failed using Python!  Maybe my
>requirements are too strict.  For modeling ``ordinary'' function calls
>a combination of Queue.Queue and threading.Thread.join(timeout=...) can
>be used.  But if the function call winds up doing cpu intensive stuff
>(for example pow()) at the C level then the Python threading timeout
>fails, so the caller can not carry on in time.  And *that* is essential
>for the realtime modeling primitive.  Performance is no issue, the
>simulation is allowed to be very slow, as long as it does implement the
>primitive correctly.

Ah!  You need to set up your C primitives to release the GIL.  That
should be easy as long as your C functions don't need to communicate
with other threads *or* Python while they operate.
Aahz (aahz at           <*>

Project Vote Smart:

More information about the Python-list mailing list