Strictly 'local' threads in Python?

David Bolen db3l at fitlinxx.com
Thu Aug 24 14:43:48 EDT 2000


"Robert Yodlowski" <robert.yodlowski at intel.com> writes:

> Now, I need to be able to do something similar but embedded in a different
> application that "does not support threading". I've tried embedding Python
> with the standard threading module but the application crashes immediately
> when I try to run it.

There have been other suggestions as to trying stackless and/or
uthreads, which I do think fits your problem domain nicely from your
description, but I thought I would also suggest that if your platform
is Windows (you didn't mention), you could double check that your
application that you are embedding Python into gets compiled to use
the MSVCRT.DLL version of the C RTL.  That's required both to match
with what Python is using as well as to support the multi-threading at
the C RTL layer.

Note that this doesn't mean your main application needs to support or
even know about multiple threads - Python can handle its own use of
the native threads within your embedded script just fine.

I presume non-Windows platforms would have a similar issue in terms of
using a suitable C RTL to provide the Python core with threading even
if your application didn't require it.

At the least this might resolve the quick issue of just embedding your
existing code.

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list