temporalio / sdk-python

Temporal Python SDK
MIT License
472 stars 75 forks source link

Custom slot supplier #690

Closed Sushisource closed 5 days ago

Sushisource commented 1 week ago

What was changed

Add user-implementable slot suppliers

Why?

Parity. Cool feature.

Checklist

  1. Closes

  2. How was this tested: Added tests

  3. Any docs updates needed? Yes, docs to follow when .NET is done

Sushisource commented 1 week ago

My only remaining concern is I will sometimes see lines like this on test shutdown:

Task was destroyed but it is pending!
task: <Task pending name='Task-27' coro=<_ErrorLoggingSlotSupplier.reserve_slot() done

I also occasionally will see them for stuff I didn't touch, though. AFAICT this is simply whining that a cancelled task didn't get one more go in the event loop to have the CancelledError it raised propagate up, but I'm not sure if that's really a real issue or just the tests exiting directly following worker shutdown.