Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //slaves
- def machines = ['a', 'b', 'c']
- //container
- def ds = [:]
- for (machine in machines) {
- //prints "Adding entry a\n...Adding entry b\n..." as expected
- print("Adding entry for: " + machine);
- ds[machine] = {download_builds( machine )}; //entry is added, apparently.
- }
- //execute all closures in hash ds concurrently
- parallel ds;
- //They all execute download_builds('c'); ... ? Because the last assignment made to 'machine' was 'c'?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement