Re: port threadsafety redux

2015-03-04 Thread Ludovic Courtès
Andy Wingo skribis: > Namely, ports can have associated recursive mutexes. They can be in a > mode in which every operation on a port grabs the mutex. The interface > to set a port into unlocked mode (à la fsetlocking) is unimplemented, > but the machinery is there. > > This change fixed the cr

Re: port threadsafety redux

2015-02-17 Thread Chris Vine
On Wed, 11 Feb 2015 22:23:43 +0100 Andy Wingo wrote: > Hi! > > So, threads and ports again. We didn't really come to a resolution in > this thread: > > http://article.gmane.org/gmane.lisp.guile.devel/17023 > > To recap, in Guile 2.0 a port has mutable internal state that can be > corrupted w

Re: port threadsafety redux

2015-02-13 Thread David Pirotte
Hi Andy, > ... > This change fixed the crashes I was seeing, but it slows down port > operations. For an intel chip from a couple years ago the slowdown was > something on the order of 3x, for a tight putchar() loop; for Loongson > it could be as bad as 26x. Mark was unhappy with this. I agree

port threadsafety redux

2015-02-11 Thread Andy Wingo
Hi! So, threads and ports again. We didn't really come to a resolution in this thread: http://article.gmane.org/gmane.lisp.guile.devel/17023 To recap, in Guile 2.0 a port has mutable internal state that can be corrupted when when multiple threads write to it at once. I ran into this when doi