I would like to execute some functions in parallel, but the last method has
to wait until the first 2 functions have finished.

The script is:

FUNCTION_1() {
...
}
FUNCTION_2() {
...
}
FUNCTION_3() {
...
}
FUNCTION_1 &
FUNCTION_2
FUNCTION_3

So, to speed up the execution of the script, I want FUNCTION_1 and
FUNCTION_2 in parallel. But the script fails when FUNCTION_2 ends before
FUNCTION_1.

Is there any mechanism for synchronization (i.e. semaphores/mutes) or any
other suggestion for simulating it?

Thanks in advance,
Jaime
-- 
View this message in context: 
http://www.nabble.com/Is-there-any-mutex-semaphore-mechanism-in-shell-scripts--tp23641994p23641994.html
Sent from the Gnu - Bash mailing list archive at Nabble.com.



Reply via email to