[Zope] calling background/child processes
Michel Pelletier
michel@digicool.com
Wed, 08 Mar 2000 10:29:54 -0800
Philipp Dunkel wrote:
>
> Hi everyone.
> When calling my ZClass_add method I want to call an external
> python method. Is there any way to let the method return immediately
> so that the script is running in the background?
Yes, spawn a new thread.
WARNING this can cause havoc if not done properly. For example, if you
want your seperate thread to be able to read and write data to the
database, you MUST open a seperate connection to the DB. If your thread
goes away, you MUST close that connection. There are a couple how-tos
on the site that explain database connections.
-Michel