Publishing is executed as a transaction: if the execution of a workflow associated with a publishing destination fails, or if the update or workflow of any of the automatically filled sub-destination fails the database is not updated at all.
The transaction behavior means that the publishing destination can remain checked-out for a long time (if there is an associated workflow for the time it takes to complete execution). During this time attempts by other user to publish or unpublish on the same destination will fail because the destination is in use. To alleviate this problem the check-out of the publishng destination is attempted multiple times with a pause between consecutive attempts. Number of attempts and interval are configurable: PublishRetryNumber and PublishRetryInterval in ServerConfig.xml. The default values are 3 and 1000 = 1 sec - so the total time is 3 seconds - enough if there are no long workflows.
Each 'publish' operation can actually be a combination of remove and add objects to the publishing destination. See GNClient.Rest.PublishCmd
It is possible to specify in the publishing destination template a list of allowed object types (allowedType of pubTemplate - declared in GN4Base.xsd) and a minimum and maximum number of objects published in the destination (minObjs, maxObjs in pubTemplate as well). Attempts to publish objects not of the allowed types or publish/unpublish that cause the number of published objects to to go above or belowe the limits cause an error.
Note that this means that the schema (GN4Base.xsd) changed - please re-import the schemas.
The pages (PublishForm.aspx, InterPublish.ascx) executing the publishing do not do it directly, but calling the 'Publish' command of do.aspx in a workflow progress control (i.e. via an IFRAME) - so that the multiple workflows (if any) can execute sequentially sending their progress report to the calling page.
See also
About long publishing operations