Python loop and web server (bottle) in the same script (Posting On Python-List Prohibited)

Gregory Ewing greg.ewing at canterbury.ac.nz
Fri Nov 24 17:06:05 EST 2017


Lawrence D’Oliveiro wrote:
> I naturally concluded that you didn’t care about
> updates being momentarily held up by a web request in progress--which would
> happen anyway if you used threads, at least with CPython.

Not necessarily -- the web processing is probably I/O bound,
in which case the GIL will likely be released a lot of the time.

But if you want to be sure the GIL won't get in the way,
you would need to run the web and update tasks in separate
processes.

-- 
Greg



More information about the Python-list mailing list