Chris Angelico <ros...@gmail.com> writes:

> On Fri, Oct 11, 2013 at 7:41 PM, Peter Cacioppi
> <peter.cacio...@gmail.com> wrote:
>> So, my hope is that the GIL restrictions won't be problematic here. That is 
>> to say, I don't need **Python** code to ever run concurrently. I just need 
>> Python to allow a different Python worker thread to execute when all the 
>> other worker threads are blocking on the model.solve() task. Once the 
>> algorithm is in full swing, it is typical for all the worker threads should 
>> be blocking on model.Solve() at the same time.
>
> Sounds like Python will serve you just fine! Check out the threading
> module, knock together a quick test, and spin it up!

But it only works if the external C library has been written to release
the GIL around the long computations. If not, then the OP could try to
write a wrapper around them that does this.
-- 
Piet van Oostrum <p...@vanoostrum.org>
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to