Threading on an old machine

Discussion in 'Python' started by Astley Le Jasper, Nov 10, 2008.

  1. I have an application that put on an old machine with a fresh Xubuntu
    installation (with Python 2.5). But I can't get the threading to work

    The application was written on a combination of Windows XP and
    OpenSuse and has been running without any problems using Eclipse/
    Pydev. However, now that I try to run the application using IDLE it
    just hangs. I have managed to track the point at which it hangs to
    the following line:

    for sitename in mysites:
    log.info("define thread")
    thread_list[search_engine]=threading.Thread(name=sitename,
    target=myproceedure, args=(sitename,))
    log.info("done")
    thread_list[search_engine].start()
    log.info("Started")

    It gets to the "done" and then hangs. It doesn't appear to get to
    'myproceedure'.

    The machine is an old Pentium II, with 256mb and 3gb spare on the HD.
    It doesn't appear to be having any problems with the other scripts
    I've ran.

    ALJ
    Astley Le Jasper, Nov 10, 2008
    #1
    1. Advertising

  2. Sorry ... that should be:

    for sitename in mysites:
    log.info("define thread")

    thread_list[sitename]=threading.Thread(name=sitename,target=myproceedure,
    args=(sitename,))
    log.info("done")
    thread_list[sitename].start()
    log.info("Started")
    Astley Le Jasper, Nov 10, 2008
    #2
    1. Advertising

  3. On 10 Nov, 11:07, Astley Le Jasper <> wrote:
    > Sorry ... that should be:
    >
    > for sitename in mysites:
    >     log.info("define thread")
    >
    > thread_list[sitename]=threading.Thread(name=sitename,target=myproceedure,
    > args=(sitename,))
    >     log.info("done")
    >     thread_list[sitename].start()
    >     log.info("Started")


    Ok ... I just tried running it in the terminal and it works ... so I
    presume there must be an issue with IDLE?
    Astley Le Jasper, Nov 10, 2008
    #3
  4. Astley Le Jasper

    Terry Reedy Guest

    Astley Le Jasper wrote:
    > I have an application that put on an old machine with a fresh Xubuntu
    > installation (with Python 2.5). But I can't get the threading to work
    >
    > The application was written on a combination of Windows XP and
    > OpenSuse and has been running without any problems using Eclipse/
    > Pydev. However, now that I try to run the application using IDLE it
    > just hangs. I have managed to track the point at which it hangs to
    > the following line:
    >
    > for sitename in mysites:
    > log.info("define thread")
    > thread_list[search_engine]=threading.Thread(name=sitename,
    > target=myproceedure, args=(sitename,))
    > log.info("done")
    > thread_list[search_engine].start()
    > log.info("Started")
    >
    > It gets to the "done" and then hangs. It doesn't appear to get to
    > 'myproceedure'.


    Since 'myproceedure' is before 'done', the above is unclear.
    Terry Reedy, Nov 10, 2008
    #4
  5. On 10 Nov, 16:20, Terry Reedy <> wrote:
    > Astley Le Jasper wrote:
    > > I have an application that put on an old machine with a fresh Xubuntu
    > > installation (with Python 2.5). But I can't get the threading to work

    >
    > > The application was written on a combination of Windows XP and
    > > OpenSuse and has been running without any problems using Eclipse/
    > > Pydev. However, now that I try to run the application using IDLE it
    > > just hangs.  I have managed to track the point at which it hangs to
    > > the following line:

    >
    > > for sitename in mysites:
    > >     log.info("define thread")
    > >     thread_list[search_engine]=threading.Thread(name=sitename,
    > > target=myproceedure, args=(sitename,))
    > >     log.info("done")
    > >     thread_list[search_engine].start()
    > >     log.info("Started")

    >
    > > It gets to the "done" and then hangs. It doesn't appear to get to
    > > 'myproceedure'.

    >
    > Since 'myproceedure' is before 'done', the above is unclear.


    I included a log.info in myprocedure. However, it doesn't trigger
    because the thread doesn't actually get to the myprocedure ... at
    least with Idle anyway.
    Astley Le Jasper, Nov 10, 2008
    #5
    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. Jim Hill
    Replies:
    3
    Views:
    388
    Jim Hill
    Feb 12, 2007
  2. *Prot3anThr3ad*

    old repository for old C++ source code

    *Prot3anThr3ad*, Sep 29, 2006, in forum: C++
    Replies:
    6
    Views:
    364
    *Prot3anThr3ad*
    Oct 2, 2006
  3. Replies:
    9
    Views:
    1,008
    Mark Space
    Dec 29, 2007
  4. John Henry
    Replies:
    24
    Views:
    990
    alex23
    May 30, 2008
  5. Steven Woody
    Replies:
    0
    Views:
    393
    Steven Woody
    Jan 9, 2009
Loading...

Share This Page