unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Recursive mutexes?
@ 2002-10-26 20:35 Marius Vollmer
  2002-10-26 21:39 ` Neil Jerram
  2002-10-26 22:16 ` Rob Browning
  0 siblings, 2 replies; 21+ messages in thread
From: Marius Vollmer @ 2002-10-26 20:35 UTC (permalink / raw)


Our current coop mutexes are not 'recursive'.  This means that a
thread blocks when it tries to lock a mutex that it already has
locked.

I think we should make our mutexes be recursive by default.  Expecting
to block when locking a mutex that is already lcoked by one self is
not very useful, since no one can unlock that mutex (excepts asyncs).

The only good argument against recursive mutexes that I can think of
is a tiny performance gain since you don't need to do some checking.

SRFI-18 specifies non-recursive mutexes and allows non-owning threads
to unlock a mutex.  Such uses of a mutex are, in my view, a mockery of
condition variables should be avoided.

If non-recursive mutexes turn out to be important, we can provide them
as well, as an option.

Ok?

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2002-10-27 18:44 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-26 20:35 Recursive mutexes? Marius Vollmer
2002-10-26 21:39 ` Neil Jerram
2002-10-27  0:03   ` Marius Vollmer
2002-10-27  1:20     ` Thomas Bushnell, BSG
2002-10-27 12:36       ` Marius Vollmer
2002-10-27  7:55     ` Neil Jerram
2002-10-27 18:33       ` Rob Browning
2002-10-26 22:16 ` Rob Browning
2002-10-26 22:29   ` Rob Browning
2002-10-26 22:42   ` Tom Lord
2002-10-26 23:26     ` Thomas Bushnell, BSG
2002-10-26 23:35       ` Tom Lord
2002-10-26 23:50         ` Tom Lord
2002-10-27  1:18           ` Thomas Bushnell, BSG
2002-10-26 22:47   ` Tom Lord
2002-10-27  8:33     ` Neil Jerram
2002-10-27 17:21       ` Tom Lord
2002-10-27  0:35   ` Marius Vollmer
2002-10-27  4:36     ` Rob Browning
2002-10-27 11:32       ` Marius Vollmer
2002-10-27 18:44         ` Rob Browning

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).