micropython-lib icon indicating copy to clipboard operation
micropython-lib copied to clipboard

python-stdlib/threading: Add Lock, Condition and Event to threading.

Open andrewleech opened this issue 3 years ago • 2 comments

Requires https://github.com/micropython/micropython-lib/pull/440

andrewleech avatar Jul 06 '22 05:07 andrewleech

PR #440 was closed without merging. The code is now in upstream, but the clear() method is not implemented.

Can you change this code here so it doesn't need deque.clear()?

Also, what's the licensing of the code here, is it copied from CPython?

dpgeorge avatar May 24 '24 09:05 dpgeorge

Thanks yes I'll update that.

These classes were copied from cpython yes, with very minimal updates for compatibility if I recall correctly.

The licencing declaration is a good point, thanks for bringing it up. I'm not sure if it's possible/appropriate to keep these in the same file as the existing (MIT presumably) Thread class? I could comment each of these classes with licence / link to original cpython implementation, or perhaps they need to move to a separate file with suitable comment at the top?

andrewleech avatar May 31 '24 06:05 andrewleech