in reply to Re^2: Global variables and SimpleHTTP request handler
in thread Global variables and SimpleHTTP request handler
For communication between processes, see perlipc.
Maybe you can use non-blocking communication within a single process by using AnyEvent, but it's likely much easier to write the commands to a file or to simply not return a response from your webserver until the command has been processed, thus pushing the requirement for asynchronicity to Scratch.
For some value of "easy", using threads can make it easy to have shared access to a common data structure which is modified concurrently. If your Perl has been compiled with thread support, that may give you a nicer approach. I still recommend a command queue approach using Thread::Queue.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Global variables and SimpleHTTP request handler
by Anonymous Monk on Jan 03, 2017 at 21:39 UTC |