Skip to content

Commit

Permalink
Adding command infrastructure to python run script
Browse files Browse the repository at this point in the history
  • Loading branch information
grf14003 committed Mar 11, 2020
1 parent b5004ca commit ea4c6ee
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
1 change: 0 additions & 1 deletion bfs/implementations/breadcrumbs/algos/AlgoBreadcrumbs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

void AlgoBreadcrumbs::loop()
{
printf("Hello world!\n");
vector<Attribute>* attribs = pollForAttributes();
if (attribs->size() > 0)
{
Expand Down
21 changes: 21 additions & 0 deletions bfs/scripts/log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,24 @@ Listening for clients...
Listening for clients...
Hello new client!
Listening for clients...
Listening for clients...
Hello new client!
Listening for clients...
Listening for clients...
Hello new client!
Listening for clients...
Listening for clients...
Hello new client!
Listening for clients...
Could not acquire mutex to add new client thread
Listening for clients...
Hello new client!
Listening for clients...
Could not acquire mutex to add new client thread
Listening for clients...
Hello new client!
Listening for clients...
Could not acquire mutex to add new client thread
Listening for clients...
Hello new client!
Listening for clients...
11 changes: 11 additions & 0 deletions bfs/scripts/startbfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,17 @@ def main():
exe_ending = ".exe"
exe_names = get_exe_names(args.algorithm, args.io_processor, args.config)
procs = [start_program_async(os.path.join(binary_path, x) + exe_ending) for x in exe_names]

try:
while True:
user_in = input()
if user_in == "q":
print("Quitting prompt")
[proc.terminate() for proc in procs]
break
except Exception as e:
print("Python exception: [%s]" % str(e))

[proc.join() for proc in procs]

print("DONE")
Expand Down

0 comments on commit ea4c6ee

Please sign in to comment.