xid
xid copied to clipboard
remove lock
itertools.count is thread safe. we can use this to remove lock
I vaguely remember reading about this when I was porting it and if I recall correctly, itertools doesn't guarantee thread safety and is only thread safe because of the GIL in the CPython implementation. Is the lock that slow that you require a lockless implementation like this?