Skip to content

Commit ce8bda3

Browse files
author
cool-RR
committed
-
1 parent 88542bd commit ce8bda3

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

garlicsim/garlicsim/asynchronous_crunching/job.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def __repr__(self): #todo: ensure not subclass?
5050
step_profile=StepProfile(<unbound method State.step>)))
5151
'''
5252
# todo: too long, should shorten
53+
# tododoc: use short step profile form
5354

5455
stuff = []
5556
stuff.append("node=%s" % self.node)

garlicsim_wx/garlicsim_wx/gui_project.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,8 @@ def fork_by_crunching(self, *args, **kwargs):
676676
to the step function. You may pass a StepProfile yourself, as the only
677677
argument, and it will be noticed and used. If nothing is passed in *args
678678
or **kwargs, the step profile of the active node will be used.
679+
680+
Returns the job.
679681
'''
680682
#todo: maybe not let to do it from unfinalized touched node?
681683

@@ -694,8 +696,8 @@ def fork_by_crunching(self, *args, **kwargs):
694696

695697
kwargs = {'step_profile': step_profile}
696698

697-
self.project.begin_crunching(node, self.default_buffer or 1,
698-
step_profile)
699+
return self.project.begin_crunching(node, self.default_buffer or 1,
700+
step_profile)
699701

700702

701703
def fork_by_editing(self):
@@ -767,11 +769,12 @@ def sync_crunchers(self):
767769
# (b) Changed the soft block it's pointing to.
768770
#
769771
# The thing is, if there was a structural modification in the tree,
770-
# this condition must be True. Therefore we call this here:
772+
# this condition must be True. So we report a structure
773+
# modification:
771774

772775
self.tree_structure_modified_at_unknown_location_emitter.emit()
773776

774-
# Even though we are not sure that the tree structure was modified;
777+
# Even though we are not sure that the tree structure was modified.
775778
# We have to play it safe. And since this condition doesn't happen
776779
# most of the time when crunching, we're not wasting too much
777780
# rendering time by assuming this is a structural modification.

0 commit comments

Comments
 (0)