I'm using CGI::Application and CGI::Application::Plugin::Session
In runmode A, the user select two or more from a list of files pdf to merge together. This is a simple form with checkboxes.
This directs to runmode B, in which the operation takes place, any errors are recorded as feedback in the session object. Runmode B gives no output to the user, simply runs the operation, records any errors in the session, and redirects back to the list.
(At most any given runmode, the session is checked for "feedback" and it is output to the user one time, and then erased. This has come in incredibly handy. CGI::Application::Plugin::Feedback)
The users say this takes a long time to do- waiting for the operation to actually take place.
It's not going to take less time, because it's an expensive operation.
What I have in mind as a solution is; they select from a list of files, and I fork mid runmode.
While forked, the operation takes place, and if errors happen, they are saved to the session object.
My concern is that two instances will potentially be writing to the session object at the same time.
Are there any other concerns that I should have (not about fork) in regards to what I am going to do here?