Threading on an old machine

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Astley Le Jasper

    Threading on an old machine

    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("defin e thread")
    thread_list[search_engine]=threading.Thre ad(name=sitenam e,
    target=myprocee dure, args=(sitename, ))
    log.info("done" )
    thread_list[search_engine].start()
    log.info("Start ed")

    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

    #2
    Re: Threading on an old machine

    Sorry ... that should be:

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

    thread_list[sitename]=threading.Thre ad(name=sitenam e,target=myproc eedure,
    args=(sitename, ))
    log.info("done" )
    thread_list[sitename].start()
    log.info("Start ed")

    Comment

    • Astley Le Jasper

      #3
      Re: Threading on an old machine

      On 10 Nov, 11:07, Astley Le Jasper <Astley.lejas.. .@gmail.comwrot e:
      Sorry ... that should be:
      >
      for sitename in mysites:
          log.info("defin e thread")
      >
      thread_list[sitename]=threading.Thre ad(name=sitenam e,target=myproc eedure,
      args=(sitename, ))
          log.info("done" )
          thread_list[sitename].start()
          log.info("Start ed")
      Ok ... I just tried running it in the terminal and it works ... so I
      presume there must be an issue with IDLE?

      Comment

      • Terry Reedy

        #4
        Re: Threading on an old machine

        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("defin e thread")
        thread_list[search_engine]=threading.Thre ad(name=sitenam e,
        target=myprocee dure, args=(sitename, ))
        log.info("done" )
        thread_list[search_engine].start()
        log.info("Start ed")
        >
        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.

        Comment

        • Astley Le Jasper

          #5
          Re: Threading on an old machine

          On 10 Nov, 16:20, Terry Reedy <tjre...@udel.e duwrote:
          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("defin e thread")
              thread_list[search_engine]=threading.Thre ad(name=sitenam e,
          target=myprocee dure, args=(sitename, ))
              log.info("done" )
              thread_list[search_engine].start()
              log.info("Start ed")
          >
          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.

          Comment

          Working...