Search Results

Search found 2 results on 1 pages for 'sourajit basak'.

Page 1/1 | 1 

  • Does thread pool size keep growing for scheduledthreadpoolexecutor?

    - by Sourajit Basak
    Imagine a situation where tasks are being added to scheduledthreadpoolexecutor. Each of these tasks will keep on running at different periodic intervals. Although all such tasks will not be running at the same time because each is set at different intervals, there may be a situation where a high number of threads are competing for execution. Is there any restriction on total number of threads ? It seems there is a restriction on the total number of idle threads. And does this concept of idle thread imply that long running tasks (thread) may be destroyed and recreated when needed ?

    Read the article

  • Building a ctypes-"based" C library with distutils

    - by Robie Basak
    Following this recommendation, I have written a native C extension library to optimise part of a Python module via ctypes. I chose ctypes over writing a CPython-native library because it was quicker and easier (just a few functions with all tight loops inside). I've now hit a snag. If I want my work to be easily installable using distutils using python setup.py install, then distutils needs to be able to build my shared library and install it (presumably into /usr/lib/myproject). However, this not a Python extension module, and so as far as I can tell, distutils cannot do this. I've found a few references to people other people with this problem: Someone on numpy-discussion with a hack back in 2006. Somebody asking on distutils-sig and not getting an answer. Somebody asking on the main python list and being pointed to the innards of an existing project. I am aware that I can do something native and not use distutils for the shared library, or indeed use my distribution's packaging system. My concern is that this will limit usability as not everyone will be able to install it easily. So my question is: what is the current best way of distributing a shared library with distutils that will be used by ctypes but otherwise is OS-native and not a Python extension module? Feel free to answer with one of the hacks linked to above if you can expand on it and justify why that is the best way. If there is nothing better, at least all the information will be in one place.

    Read the article

1