Enter a new event in the queue at an absolute time. Returns an ID for the event which can be used to remove it, if necessary.
(self, time, priority, action, argument=(), kwargs=_sentinel)
| 60 | self._sequence_generator = count() |
| 61 | |
| 62 | def enterabs(self, time, priority, action, argument=(), kwargs=_sentinel): |
| 63 | """Enter a new event in the queue at an absolute time. |
| 64 | |
| 65 | Returns an ID for the event which can be used to remove it, |
| 66 | if necessary. |
| 67 | |
| 68 | """ |
| 69 | if kwargs is _sentinel: |
| 70 | kwargs = {} |
| 71 | |
| 72 | with self._lock: |
| 73 | event = Event(time, priority, next(self._sequence_generator), |
| 74 | action, argument, kwargs) |
| 75 | heapq.heappush(self._queue, event) |
| 76 | return event # The ID |
| 77 | |
| 78 | def enter(self, delay, priority, action, argument=(), kwargs=_sentinel): |
| 79 | """A variant that specifies the time as a relative time. |