Blocking a thread for x seconds

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Fernando Rodríguez

    #1

    Blocking a thread for x seconds


    Hi,

    I have a class that descends from threading.Threa d. One method should block
    the thread during x seconds and then call another method. How can I do this?


  • Diez B. Roggisch

    #2
    Re: Blocking a thread for x seconds

    Fernando Rodredguez wrote:
    [color=blue]
    > I have a class that descends from threading.Threa d. One method should
    > block
    > the thread during x seconds and then call another method. How can I do
    > this?[/color]

    time.sleep(x)[*]


    * this comes witout any warranty about the slept time whatsoever under the
    assumption that time.sleep is not run under a RTOS with guaranteed timings

    Diez


    Comment

    Working...