File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -712,18 +712,18 @@ called).
712
712
```
713
713
714
714
When a ` Subtask ` finishes, it calls ` release_lenders ` to allow owned handles
715
- passed to this subtask to be dropped. In the synchronous or eager case this
716
- happens immediately before returning to the caller. In the
717
- asynchronous+blocking case, this happens right before the ` CallState.DONE `
718
- event is delivered to the guest program .
715
+ passed to this subtask to be dropped. In the asynchronous blocking case, this
716
+ happens right before the ` CallState.DONE ` event is delivered to the guest
717
+ program in ` subtask_event() ` (above). Otherwise, it happens synchronously
718
+ when the subtask finishes .
719
719
``` python
720
720
def finish (self ):
721
721
assert (self .state == CallState.RETURNED )
722
722
self .state = CallState.DONE
723
- if self .opts.sync or not self .notify_supertask:
724
- self .release_lenders()
725
- else :
723
+ if self .notify_supertask:
726
724
self .maybe_notify_supertask()
725
+ else :
726
+ self .release_lenders()
727
727
return self .flat_results
728
728
```
729
729
Original file line number Diff line number Diff line change @@ -520,10 +520,10 @@ def on_return(self, vs):
520
520
def finish (self ):
521
521
assert (self .state == CallState .RETURNED )
522
522
self .state = CallState .DONE
523
- if self .opts .sync or not self .notify_supertask :
524
- self .release_lenders ()
525
- else :
523
+ if self .notify_supertask :
526
524
self .maybe_notify_supertask ()
525
+ else :
526
+ self .release_lenders ()
527
527
return self .flat_results
528
528
529
529
def drop (self ):
You can’t perform that action at this time.
0 commit comments