Re: [pypy-dev] fiber support

2017-10-18 Thread Armin Rigo
Hi David, On 16 October 2017 at 21:18, David Callahan wrote: > folly:fibers (https://github.com/facebook/folly/tree/master/folly/fibers ) > is a C++ package for lightweight, cooperatively scheduled threads. We have > an application which extends this to CPython by adding the following > save/re

Re: [pypy-dev] fiber support

2017-10-17 Thread Maciej Fijalkowski
Heh, sure Did you look whether such functionality can be replicated with PyThreadState_New and PyThreadState_Swap? Cheers, fijal On Tue, Oct 17, 2017 at 7:57 PM, David Callahan wrote: > Hi Maciej, thanks for the reply > > I have been warned before about the performance of cpyext but we have >

Re: [pypy-dev] fiber support

2017-10-17 Thread David Callahan
Hi Maciej, thanks for the reply I have been warned before about the performance of cpyext but we have hundreds of source dependencies and removing such reliance does not help us in the short term. Thus, performance is not a concern yet since we are not even at a point to run the code and know

Re: [pypy-dev] fiber support

2017-10-17 Thread Maciej Fijalkowski
Hi David. You're probably completely aware that such calls (using cpyext) would completely kill performance, right? I didn't look in detail, but in order to get performance, you would need to write such calls using cffi. Best regards, Maciej Fijalkowski On Mon, Oct 16, 2017 at 7:18 PM, David Cal

[pypy-dev] fiber support

2017-10-16 Thread David Callahan
folly:fibers (https://github.com/facebook/folly/tree/master/folly/fibers ) is a C++ package for lightweight, cooperatively scheduled threads. We have an application which extends this to CPython by adding the following save/restore code around task function invocation: auto tstate = PyT