For Programmers: Free Programming Magazines  


Home > Archive > Scheme > September 2005 > write-once variables ("placeholders") with SRFI-18 threads









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author write-once variables ("placeholders") with SRFI-18 threads
dbfaken

2005-09-12, 6:59 pm

Hello,

Does anyone know if it is possible to implement write-once variables
(known as "placeholders" in Scheme-48) with the SRFI-18 primitives?
I can't really see any way to do this, given that nothing is
guaranteed to be atomic .

I can use mutex's to lock access to a variable, but I would like to
be able to discard them after the variable has been set.. (i.e. only
require them for blocking before setting, and setting) -- so that after
it has been set, access is as usual for any (read-only) variable.


thanks!
Daniel Faken

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com