File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 1
- import parsl
1
+ # def wait():
2
+ # print('asdlfkjaslkdf')
3
+ # import time
4
+ # time.sleep(3)
5
+ # #import parsl
6
+ # #parsl.wait_for_current_tasks()
7
+ #
8
+ # import atexit
9
+ # atexit.register(wait)
2
10
3
11
from .execution import ExecutionContextLoader , load_from_yaml # noqa: F401
4
12
5
13
load = ExecutionContextLoader .load
6
14
parse_config = ExecutionContextLoader .parse_config
7
15
context = ExecutionContextLoader .context
8
- wait = parsl . wait_for_current_tasks
16
+ wait = ExecutionContextLoader . wait
Original file line number Diff line number Diff line change 1
1
from __future__ import annotations # necessary for type-guarding class methods
2
2
3
- import atexit
4
3
import copy
5
4
import logging
6
5
import math
@@ -447,7 +446,6 @@ def load(
447
446
)
448
447
path_context = path / "context_dir"
449
448
cls ._context = ExecutionContext (config , definitions , path_context )
450
- atexit .register (parsl .wait_for_current_tasks )
451
449
return cls ._context
452
450
453
451
@classmethod
@@ -456,6 +454,10 @@ def context(cls):
456
454
raise RuntimeError ("No ExecutionContext is currently loaded" )
457
455
return cls ._context
458
456
457
+ @classmethod
458
+ def wait (cls ):
459
+ parsl .wait_for_current_tasks ()
460
+
459
461
460
462
def load_from_yaml (path : Union [str , Path ]) -> ExecutionContext :
461
463
assert ExecutionContextLoader ._context is None # no previously loaded context
You can’t perform that action at this time.
0 commit comments