Interrupt an extension module function

Discussion in 'Python' started by Rici.Yu, Jan 14, 2004.

  1. Rici.Yu

    Rici.Yu Guest

    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
     
    Rici.Yu, Jan 14, 2004
    #1
    1. Advertising

  2. 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)

    --
    > ============================================================== <
    > | Wulfraed Dennis Lee Bieber KD6MOG <
    > | Bestiaria Support Staff <
    > ============================================================== <
    > Bestiaria Home Page: http://www.beastie.dm.net/ <
    > Home Page: http://www.dm.net/~wulfraed/ <
     
    Dennis Lee Bieber, Jan 15, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ilariu Raducan
    Replies:
    2
    Views:
    357
    Ilariu Raducan
    Jul 14, 2004
  2. Todd
    Replies:
    1
    Views:
    318
    Erik Max Francis
    Dec 23, 2005
  3. mani
    Replies:
    3
    Views:
    306
    Default User
    Nov 18, 2007
  4. Floris Bruynooghe
    Replies:
    1
    Views:
    360
    Floris Bruynooghe
    Dec 24, 2008
  5. dutche
    Replies:
    13
    Views:
    542
    Kenny McCormack
    May 4, 2010
Loading...

Share This Page