Skip to content

Commit

Permalink
Move task_launch_lock into initial TaskRecord (#2930)
Browse files Browse the repository at this point in the history
There's no reason for it to be omitted and added later, and this style is
more defensive.
  • Loading branch information
benclifford authored Nov 1, 2023
1 parent f95461e commit 28c3521
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions parsl/dataflow/dflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,7 @@ def submit(self,
'joins': None,
'try_id': 0,
'id': task_id,
'task_launch_lock': threading.Lock(),
'time_invoked': datetime.datetime.now(),
'time_returned': None,
'try_time_launched': None,
Expand Down Expand Up @@ -1029,8 +1030,6 @@ def submit(self,
task_record['func_name'],
waiting_message))

task_record['task_launch_lock'] = threading.Lock()

app_fu.add_done_callback(partial(self.handle_app_update, task_record))
self.update_task_state(task_record, States.pending)
logger.debug("Task {} set to pending state with AppFuture: {}".format(task_id, task_record['app_fu']))
Expand Down

0 comments on commit 28c3521

Please sign in to comment.