Skip to content

Commit 4031272

Browse files
feat(example): add sleep to simulate long running tasks
1 parent 2db4fdd commit 4031272

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

example/application_generator_m.f90

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,12 @@ function compile_task_execute(self, task_number, upstream_task_results) result(o
117117
integer, intent(in) :: task_number
118118
type(task_payload_map_t), intent(in) :: upstream_task_results
119119
type(payload_t) :: output
120-
121-
call put_line("Executing task number: " // to_string(task_number))
120+
121+
real :: rand
122+
123+
call put_line("Executing task number: " // to_string(task_number) // " on image number: " // to_string(this_image()))
124+
call random_number(rand)
125+
call sleep(int(rand * 10))
122126
call put_line("Compiling: " // self%to_compile)
123127
end function
124128
end module

0 commit comments

Comments
 (0)