module main

fn rsync(a string, b string) IError {
	return none
}

fn main() {
	options := {
		'a': 'b'
		'b': 'b'
		'c': 'b'
		'd': 'b'
	}

	mut eflag := false
	mut threads := []thread IError{}

	for srv, port in options {
		threads << go rsync(srv, port)
	}

	awt := threads.wait()

	for e in awt {
		if e.str() != 'none' {
			eflag = true
			eprintln(e.str())
		}
	}

	if eflag {
		exit(1)
	}
}
