• Terminating a thread after 5s

    GPy thread timeout
    3
    0 Votes
    3 Posts
    349 Views
    K
    @oligauc Have realised thread locking was not what we were after. What we actually want to do is put getaddrinfo in a thread so that if it the DNS lookup takes forever or fails the main program can move on. Unfortunately, this is not what happens, the main program pauses & waits for the thread. https://forum.pycom.io/topic/5295/getaddrinfo in-a-thread
  • urequests timeouts

    GPy timeout urequests
    9
    0 Votes
    9 Posts
    676 Views
    K
    @andreas blobs are a bit beyond my skill set but ai=socket.getaddrinfo(host, 443) is using a socket so I reckon a 5s OSError socket timeout should prevent hangs if someone can figure out how to change the default timeout & recompile. My thread attempt was pretty simple, put getaddrinfo in a thread, wait for 5s in the main program then move on if the thread had not produced a DNS by then. Instead the main program stalled after 1 iteration of the 5s delay loop and waited for the thread.
  • 0 Votes
    10 Posts
    1k Views
    T
    @robert-hh Thank you, It works like a charm! :)
  • Lopy LoRa socket timeout

    LoPy lopy lopy lorawan socket timeout
    3
    0 Votes
    3 Posts
    1k Views
    A
    @livius Thank you so much!!! that's exactly what I needed
  • can.recv() timeout wrong

    Issues & Bugs can canbus timeout
    3
    0 Votes
    3 Posts
    835 Views
    J
    Are you sure it is the documentation that is wrong? Isn´t it more natrual to specify timeout in ms?
  • 0 Votes
    7 Posts
    2k Views
    P
    Hey @livius, that did the trick, again! Thx a lot, that makes even easier the deployment process, and i´ve also learned pretty nice stuff in the meanwhile. By the way, i first tried to make it work by cloning the project 'master' branch, but that code wasn´t making the deal yet. To make things work i had to clone the 'devel' branch (that by the way it´s weird because it´s one version behind 0.9.3 than master 0.9.4). [image: 1493898017001-upload-f0ec380b-2af6-42cb-908e-3ed47257fabf.png] Thx a lot again man, saved my life!