Interrupt an extension module function

R

Rici.Yu

Hi all,

It seems that python does not interrupt a C-extension module function
when a user types CTRL-C. I am not sure this is the expected behavior
as this is first time I came across this problem. If it is, what do I
have to do to let the user interrupt a long-running extension function?

Thanks.
-Rici
 
D

Dennis Lee Bieber

Rici.Yu fed this fish to the penguins on Wednesday 14 January 2004
07:43 am:

It seems that python does not interrupt a C-extension module function
when a user types CTRL-C. I am not sure this is the expected behavior
as this is first time I came across this problem. If it is, what do I
have to do to let the user interrupt a long-running extension
function?

Based upon your headers, you are running on a Windows system... I've
got a script I run under both Windows and Linux (depending on which I'm
booted into -- it "polls" my ISP mailbox to delete Swen infected email
before my client can download them).

On Windows, a <ctrl-c> doesn't respond for upwards of 3 minutes -- the
delay between ISP checks. On Linux, it responds immediately.

I suspect much of your concern is OS specific behavior -- I think
Windows performs <ctrl-c> checking only when some sort of I/O operation
takes place... (or similar type of OS service call)

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,481
Members
44,900
Latest member
Nell636132

Latest Threads

Top