apify-sdk-python icon indicating copy to clipboard operation
apify-sdk-python copied to clipboard

Synchronize `Actor.charge` calls to prevent race conditions in `Actor.push_data`

Open janbuchar opened this issue 4 months ago • 0 comments

  • calls to ChargingManager.charge should be safe because the "critical section" does not yield
  • however, when calling PPE-aware Actor.push_data there might be some interleaving of the push_data and charge API calls that may lead to unintended behavior
  • it would probably be best to hold all Actor.charge calls if there is an Actor.push_data in progress

janbuchar avatar Nov 07 '25 09:11 janbuchar