Comment #5 on issue 51 by
ele...@gmail.com: Script hangs if group==after
http://code.google.com/p/fabricate/issues/detail?id=51
Seems google code doesn't apply email replys to comments to the issue, so
re-posted here.
Yes I noticed that's the way it works. The usage I made was not a
dependency graph buy a critical section. Meaning I don't expect it to wait
a command group='bb' is run but only to wait if there is one running in
that group, until it finishes.
The 'group' option specifies that this run command is part of a group of
commands. The 'after' option specifies an ordering dependency, that this
command must not run until after *all* the commands in the named group have
completed. That is how those options are specified to work.
Have a name group= is adding to the confusion as it implies more than one
item can be part of it.
Indeed, any number of commands can be part of a group. A group is a name
for that set of commands so they can be referred to. Running after the
group depends on them *all* completing, therefore no command can specify it
needs to run after a group it is part of, nor can any other cycle exist in
the ordering graph or there will be a deadlock as you experienced.
Another part adding to that confusion, is that wait() will not wait if
nothing is run(), but wait= will until that group (or first of that group?)
is run().
There is no wait() function or 'wait' option in the fabricate API? Not
sure what you mean.
I'd suggest to check if group=wait.
To it more clear and support more I'd also suggest to make wait= work like
a critical section (don't run while something of the group is running) and
rename the existing wait= to dependOn=.
Last, the Ctrl+C is not really working in multithreaded mode. The issue is
that it loses time in many occasions, which is the opposite of the goal of
multithreading.
Not sure what you mean here either. The fabricate parallel processing is
not multi-threaded, it is multi-process, it runs multiple commands in
separate processes. Aborting the main process with Ctrl+C may not cause
child processes to abort unless they are part of the same process group.
Is that the issue?