[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #28864 [Core Tor/sbws]: sbws AsyncResults have no timeout



#28864: sbws AsyncResults have no timeout
---------------------------+-----------------------------------
 Reporter:  teor           |          Owner:  (none)
     Type:  defect         |         Status:  needs_review
 Priority:  Medium         |      Milestone:  sbws: 1.1.x-final
Component:  Core Tor/sbws  |        Version:  sbws: 1.0.2
 Severity:  Normal         |     Resolution:
 Keywords:                 |  Actual Points:
Parent ID:  #28663         |         Points:
 Reviewer:                 |        Sponsor:
---------------------------+-----------------------------------
Changes (by juga):

 * cc: juga, teor (removed)
 * status:  new => needs_review
 * milestone:  sbws: 1.0.x-final => sbws: 1.1.x-final


Comment:

 Replying to [comment:3 juga]:
 > I looked more at this.
 > `wait` is the method of an `event`
 (https://github.com/python/cpython/blob/master/Lib/multiprocessing/pool.py#L662),
 and it blocks
 (https://docs.python.org/3/library/threading.html?highlight=threading#threading.Event.wait)

 a maximum of `timeout`.
 `get` with timeout uses `wait`, and that's what we want since pending
 results that didn't trigger either callback or callback error have not
 been gotten, and `get` give us either the exception or the value.

 After merging #28932, this is an improvement, can wait to 1.1 milestone.

 https://github.com/torproject/sbws/pull/341

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/28864#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs