473,320 Members | 1,802 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,320 software developers and data experts.

PyThreadState_SetAsyncExc and native extensions

Does anyone know if PyThreadState_SetAsyncExc stops a thread while its
inside a native extension ?
I'm trying to stop a testing script that boils down to this:

while True:
print "aaa"
native_extension_call()
print "bbb"

Using PyThreadState_SetAsyncExc the module doesn't stop but if I add
more print statements to increase the chance that
PyThreadState_SetAsyncExc is called when the module is executing Python
code, the module stops.

Apr 25 '06 #1
0 861

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

Similar topics

7
by: Rubem Pechansky | last post by:
Hi all, I have designed and successfully prototyped a native Windows binding for PHP. This binding is already capable of doing dialogs, controls, and a lot more with very few lines of code. PHP...
0
by: Bob Alistar | last post by:
Hello! I have an IVR server controlling Dialogic hardware through a DLL exposing the C API to Python. The server farms out incoming calls to python scripts based on the telephone number that...
0
by: Antoon Pardon | last post by:
I have been playing a bit with PyThreadState_SetAsyncExc. Now the documentation abouth this call states the following: | Returns the number of thread states modified; if it returns a number |...
0
by: spam_john | last post by:
I am attempting to raise an exception in a thread currently calling PyEval_CallObject from another thread using PyThreadState_SetAsyncExc. The PyEval_CallObject is currently calling of a function...
0
by: gabriel.becedillas | last post by:
I use PyThreadState_SetAsyncExc to stop a python thread but there are situations when the thread doesn't stop and continues executing normally. After some debugging, I realized that the problem is...
3
by: johan2sson | last post by:
The documentation for PyThreadState_SetAsyncExc says "To prevent naive misuse, you must write your own C extension to call this". Anyone care to list a few examples of such naive misuse? Johan
1
by: iwl | last post by:
what is the nThreadId-Parameter of PyThreadState_SetAsyncExc? I try to implement a Terminate-Button in my C-Prog for my embedded Python, but its hard to find an example how to stop an...
3
by: Amnon | last post by:
Hi, I'd like to announce release 1.0.7 of JNEXT (JavaScript Native Extensions). JNEXT is an open source framework for securely accessing the full range of native OS resources (files, databases,...
0
by: Adam Salisbury | last post by:
**To members of microsoft.public.dotnet.framework, apologies for the crosspost. I originally posted this message into that group however have since realised this may have been a better...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.