473,385 Members | 1,769 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Help please, turning off threads

I've ported Python to a realtime operating system and embedded it in an
application that controls machinery. Python will be used to expose an API
to end users. It seems prudent to disable threads.

I undefined WITH_THREAD. Now I run into this in threadmodule.c:

#error "Error! The rest of Python is not compiled with thread support."
#error "Rerun configure, adding a --with-threads option."
#error "Then run `make clean' followed by `make'."

Problem is, I've never run configure, and probably could not if I wanted to.
I used the NT distribution and hacked it into submission. All the Python
source code I'm using is now checked into a source control system. I doubt
that "configure" could handle that. I don't use "make" either.

Can someone tell me how to "configure" for no threads by hand? Does it
suffice just to remove the offending file threadmodule.c? If that is the
case, why the error message rather than just

#ifndef WITH_THREAD
#else
// the thread stuff
#endif

I removed the file from the project just to see what would happen. The
project built without reporting an error, and the program seems to run
Python okay.
Jul 18 '05 #1
2 1191
Jive wrote:
Can someone tell me how to "configure" for no threads by hand? Does it
suffice just to remove the offending file threadmodule.c? If that is the
case, why the error message rather than just


I believe the configure script removes threadmodule.c from the build process
when threads are not enabled. I haven't actually checked, though.

Building threadmodule.c when threads aren't being used suggests a mistake in the
build process - but is it the inclusion of threadmodule.c which is incorrect, or
is it the lack of the WITH_THREADS definition?

Regards,
Nick.
Jul 18 '05 #2

"Nick Coghlan" <nc******@email.com> wrote in message
news:41***********************@per-qv1-newsreader-01.iinet.net.au...
Jive wrote:
Can someone tell me how to "configure" for no threads by hand? Does it
suffice just to remove the offending file threadmodule.c? If that is the
case, why the error message rather than just
I believe the configure script removes threadmodule.c from the build

process when threads are not enabled. I haven't actually checked, though.

Building threadmodule.c when threads aren't being used suggests a mistake in the build process - but is it the inclusion of threadmodule.c which is incorrect, or is it the lack of the WITH_THREADS definition?


In this case it's neither. I just changed the #ifdef in threadmodule.c so
the file is effectively empty when WITH_THREADS is not defined. That seems
to work okay. No problems so far.

I don't didn't want to remove the file from the project. I might want to
compile with threads enabled later. If and when that happens, I won't have
to remember to include the threadmodule.c file. I'll just define the
WITH_THREADS and all will be kookletikoo.

Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
4
by: Madhu Gopinathan | last post by:
Hi All, I am faced with a horrible hang problem. I have a COM exe server that executes some tasks. The task execution manager is a thread that manages the pool of threads, which is 4 per processor....
1
by: treelife | last post by:
I'm getting and internal server error when | run the following mod_python script. I am actually trying to run Django. Script: from mod_python import apache def handler(req):...
7
by: Kirk McDonald | last post by:
Let's say I have a function that takes a callback function as a parameter, and uses it to describe an iteration: def func(callback): for i in : callback(i) For the sake of argument, assume...
15
by: Jay | last post by:
I have a multi threaded VB.NET application (4 threads) that I use to send text messages to many, many employees via system.timer at a 5 second interval. Basically, I look in a SQL table (queue) to...
8
by: Greg Lyles | last post by:
Hi all, I'm trying to develop an ASP.NET 2.0 website and am running into some real problems with what I thought would be a relatively simple thing to do. In a nutshell, I'm stuck on trying to...
6
by: theintrepidfox | last post by:
Dear Group I've installed MSSQL 2005 STD on Vista and now can't attach my databases. I've installed SQL SP2 and the SQL Vista Beta Update. The error I'm getting is: Unable to open the...
5
by: bean330 | last post by:
Hey, I'm somewhat new to C# and I need a little help, please! I'm selecting a bunch of records, setting properties on a COM executable and then calling a method on that executable to run. I...
118
by: Chuck Cheeze | last post by:
This might be in the wrong group, but... Here is an example of my data: entry_id cat_id 1 20 2 25 3 30 4 25 5 35
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.