Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Parent web app receives a request for custom packing list - spins up a new process with a templeting engine that waits for a command.
- it uses a semaphore to limit one thread being able to spinning up a process at a time
- it keeps track of current running processes in concurrent dictionary of concurrent queues.
- and uses named pipes to then communicate that it is ready
- yhr parent web app starts a new thread, pulls the process out of its concurrent queue, sends the command message and then waits for the fully rendered index.html
- the child process renders the html, streams it to a memory map file and then sends a message back to the parent app that the command is finished and gets put back in its queue
- each process uses a mutex to confirm each child process is running, if one crashes or automatically shuts down after being idle the mutex will be released and the parent app will remove its reference to the process from the queue
Add Comment
Please, Sign In to add comment