Returns a unique token.
(self)
| 249 | return len(self._funcs) |
| 250 | |
| 251 | def _next_unique_token(self): |
| 252 | """Returns a unique token.""" |
| 253 | with self._lock: |
| 254 | uid = self._unique_id |
| 255 | self._unique_id += 1 |
| 256 | return "pyfunc_%d" % uid |
| 257 | |
| 258 | |
| 259 | # Global registry for py functions. |