Interrupt an extension module function

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rici.Yu

    Interrupt an extension module function

    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

  • Dennis Lee Bieber

    #2
    Re: Interrupt an extension module function

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

    [color=blue]
    >
    > 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?[/color]

    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)

    --[color=blue]
    > =============== =============== =============== =============== == <
    > wlfraed@ix.netc om.com | Wulfraed Dennis Lee Bieber KD6MOG <
    > wulfraed@dm.net | Bestiaria Support Staff <
    > =============== =============== =============== =============== == <
    > Bestiaria Home Page: http://www.beastie.dm.net/ <
    > Home Page: http://www.dm.net/~wulfraed/ <[/color]

    Comment

    Working...