From anand.prabhakar.patil at gmail.com Fri Oct 3 09:52:45 2008 From: anand.prabhakar.patil at gmail.com (Anand Patil) Date: Fri, 3 Oct 2008 10:52:45 +0100 Subject: [clpython-devel] Will CLPython have a GIL? Message-ID: <2bc7a5a50810030252p3a2cd4c2k5f844d2de2cfa4fd@mail.gmail.com> Hi everyone, Will CLPython have a global interpreter lock? Will it allow different threads to touch Python objects simultaneously on different cores? Thanks, Anand -------------- next part -------------- An HTML attachment was scrubbed... URL: From metawilm at gmail.com Fri Oct 3 13:34:24 2008 From: metawilm at gmail.com (Willem Broekema) Date: Fri, 3 Oct 2008 15:34:24 +0200 Subject: [clpython-devel] Will CLPython have a GIL? In-Reply-To: <2bc7a5a50810030252p3a2cd4c2k5f844d2de2cfa4fd@mail.gmail.com> References: <2bc7a5a50810030252p3a2cd4c2k5f844d2de2cfa4fd@mail.gmail.com> Message-ID: On Fri, Oct 3, 2008 at 11:52 AM, Anand Patil wrote: > Will CLPython have a global interpreter lock? Will it allow different > threads to touch Python objects simultaneously on different cores? My impression is that there is no need for a global lock: if CLPython were running in an SMP-capable Lisp implementation then multiple threads could execute Python code concurrently. But for that to work correctly, first many parts of CLPython must be made thread-safe. I've not given this any attention yet. - Willem From anand.prabhakar.patil at gmail.com Fri Oct 3 15:03:35 2008 From: anand.prabhakar.patil at gmail.com (Anand Patil) Date: Fri, 3 Oct 2008 16:03:35 +0100 Subject: [clpython-devel] Will CLPython have a GIL? In-Reply-To: References: <2bc7a5a50810030252p3a2cd4c2k5f844d2de2cfa4fd@mail.gmail.com> Message-ID: <2bc7a5a50810030803n2e897361r15f46c2387928e@mail.gmail.com> Thanks, it will be great to have a fast, SMP-capable Python implementation someday. Another question: are you planning on providing a Python-C API, so that packages with compiled extensions can run on CLPython? Cheers, Anand On Fri, Oct 3, 2008 at 2:34 PM, Willem Broekema wrote: > On Fri, Oct 3, 2008 at 11:52 AM, Anand Patil > wrote: > > Will CLPython have a global interpreter lock? Will it allow different > > threads to touch Python objects simultaneously on different cores? > > My impression is that there is no need for a global lock: if CLPython > were running in an SMP-capable Lisp implementation then multiple > threads could execute Python code concurrently. But for that to work > correctly, first many parts of CLPython must be made thread-safe. I've > not given this any attention yet. > > - Willem > -------------- next part -------------- An HTML attachment was scrubbed... URL: From metawilm at gmail.com Fri Oct 3 15:27:28 2008 From: metawilm at gmail.com (Willem Broekema) Date: Fri, 3 Oct 2008 17:27:28 +0200 Subject: [clpython-devel] Will CLPython have a GIL? In-Reply-To: <2bc7a5a50810030803n2e897361r15f46c2387928e@mail.gmail.com> References: <2bc7a5a50810030252p3a2cd4c2k5f844d2de2cfa4fd@mail.gmail.com> <2bc7a5a50810030803n2e897361r15f46c2387928e@mail.gmail.com> Message-ID: On Fri, Oct 3, 2008 at 5:03 PM, Anand Patil wrote: > Thanks, it will be great to have a fast, SMP-capable Python implementation > someday. Another question: are you planning on providing a Python-C API, so > that packages with compiled extensions can run on CLPython? No, there are no plans for implementing the C API. Actually I doubt it is practically possible, given the differences in e.g. object representation, garbage collection and exception handling. - Willem