Skip to content

Commit 55ae812

Browse files
authored
Resolve increased time. (#14074)
1 parent 7439f5d commit 55ae812

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

src/lightning_app/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,5 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
2727
### Fixed
2828

2929
- Resolved a bug where the work statuses will grow quickly and be duplicated ([#13970](https://github.com/Lightning-AI/lightning/pull/13970))
30+
31+
- Resolved a bug about a race condition when sending the work state through the caller_queue ([#14074](https://github.com/Lightning-AI/lightning/pull/14074))

src/lightning_app/utilities/proxies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def _send_data_to_caller_queue(work: "LightningWork", caller_queue: "BaseQueue",
7474

7575
data.update({"state": work_state})
7676
logger.debug(f"Sending to {work.name}: {data}")
77-
caller_queue.put(data)
77+
caller_queue.put(deepcopy(data))
7878

7979
# Reset the calls entry.
8080
work_state["calls"] = calls

tests/tests_app/core/test_lightning_app.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,7 @@ def __init__(self, **kwargs):
896896

897897
def run(self, signal: int):
898898
self.counter += 1
899+
assert len(self._calls) == 2
899900

900901

901902
class SizeFlow(LightningFlow):

0 commit comments

Comments
 (0)