Re: [HACKERS] Does plpython support threading?

2016-02-07 Thread Jinhua Luo
The new thread do not call any pg API or access any pg specific data. The pg backend (main thread) puts string message into the python Queue, and the new thread gets from the Queue and write to file, it's simple and clear logic. I test the same codes standalone, it works, but when I move them into

Re: [HACKERS] Does plpython support threading?

2016-02-07 Thread Tom Lane
Jinhua Luo writes: > In my plpython function, I create new thread to do some routine works. > But I found the thread doesn't work, it would run a while, but > suddenly pause and stop working. For example, I write a test dead loop > to print something to file, but it would stop printing after some

[HACKERS] Does plpython support threading?

2016-02-07 Thread Jinhua Luo
Hi, In my plpython function, I create new thread to do some routine works. But I found the thread doesn't work, it would run a while, but suddenly pause and stop working. For example, I write a test dead loop to print something to file, but it would stop printing after some time. I am wondering w