Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- futures = [@spawn myfunction(mydata)]
- while true
- i = findnext(data_available, futures, 1)
- if i != nothing
- result = fetch(i)
- foreach(kill_task, futures)
- break
- end
- sleep(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement