Re: wip-threads-and-fork

2012-02-24 Thread Andy Wingo
On Fri 24 Feb 2012 04:00, Nala Ginrut writes: > I think I could use pipes to handle some sub-process rather than do it > with fork manually. But I must create a daemon, it can't avoid to use > fork, will this circumstance cause problems if I use threads after it? I just pushed a patch like this:

Re: wip-threads-and-fork

2012-02-24 Thread Nala Ginrut
On Fri, Feb 24, 2012 at 6:21 PM, Andy Wingo wrote: > On Fri 24 Feb 2012 04:00, Nala Ginrut writes: > > > I think I could use pipes to handle some sub-process rather than do it > > with fork manually. But I must create a daemon, it can't avoid to use > > fork, will this circumstance cause problem

Re: wip-threads-and-fork

2012-02-24 Thread Andy Wingo
Hi, Thanks for the feedback :) On Fri 24 Feb 2012 15:08, Nala Ginrut writes: > Considering the new 'open-process' hasn't been done, the issues left > suspending. Maybe I have not expressed myself well. To be clear, the new open-process implementation is now in both master and 2.0, though not

Re: allocation within critical sections

2012-02-24 Thread Andy Wingo
Hi! On Fri 17 Feb 2012 23:59, l...@gnu.org (Ludovic Courtès) writes: >> Of course, running finalizers in a separate thread will solve it. > > What about using asyncs for that? For instance, scm_i_finalize_smob > make a differed, instead of direct, call to the SMOB’s ‘free’, via > scm_i_queue_asy

Re: wip-threads-and-fork

2012-02-24 Thread Nala Ginrut
On Fri, Feb 24, 2012 at 10:47 PM, Andy Wingo wrote: > Hi, > > Thanks for the feedback :) > > On Fri 24 Feb 2012 15:08, Nala Ginrut writes: > > > Considering the new 'open-process' hasn't been done, the issues left > > suspending. > > Maybe I have not expressed myself well. To be clear, the new

Re: wip-threads-and-fork

2012-02-24 Thread Andy Wingo
Hello :) On Fri 24 Feb 2012 04:00, Nala Ginrut writes: > I think I could use pipes to handle some sub-process rather than do it > with fork manually. But I must create a daemon, it can't avoid to use > fork, will this circumstance cause problems if I use threads after it? Hummm. Very good ques

Abandon lock-based synchronization in favor of STM?

2012-02-24 Thread Mark H Weaver
Hello all, I posted this link to IRC, but for the benefit of others, here's a paper that I highly recommend for anyone interested in a better way to handle sychronization and concurrency: http://research.microsoft.com/en-us/um/people/simonpj/papers/stm/stm.pdf Mark

Re: Abandon lock-based synchronization in favor of STM?

2012-02-24 Thread Hans Aberg
On 24 Feb 2012, at 20:52, Mark H Weaver wrote: > I posted this link to IRC, but for the benefit of others, here's a paper > that I highly recommend for anyone interested in a better way to handle > sychronization and concurrency: > > http://research.microsoft.com/en-us/um/people/simonpj/papers/st

Re: wip-threads-and-fork

2012-02-24 Thread Nala Ginrut
On Sat, Feb 25, 2012 at 2:57 AM, Andy Wingo wrote: > Hello :) > > On Fri 24 Feb 2012 04:00, Nala Ginrut writes: > > > I think I could use pipes to handle some sub-process rather than do it > > with fork manually. But I must create a daemon, it can't avoid to use > > fork, will this circumstance

Re: wip-threads-and-fork

2012-02-24 Thread Nala Ginrut
On Sat, Feb 25, 2012 at 10:21 AM, Nala Ginrut wrote: > > > On Sat, Feb 25, 2012 at 2:57 AM, Andy Wingo wrote: > >> Hello :) >> >> On Fri 24 Feb 2012 04:00, Nala Ginrut writes: >> >> > I think I could use pipes to handle some sub-process rather than do it >> > with fork manually. But I must crea