caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Re: [Caml-list] Avoiding shared data
@ 2005-09-26  8:17 William Lovas
  2005-09-26 21:07 ` Ant: " Martin Chabr
  0 siblings, 1 reply; 10+ messages in thread
From: William Lovas @ 2005-09-26  8:17 UTC (permalink / raw)
  To: caml-list; +Cc: Martin Chabr

Hi Martin,

On Sun, Sep 25, 2005 at 11:32:02PM +0200, Martin Chabr wrote:
> [...]  But I cannot use the same scheme to the
> array of the (int * record) structures, because I do
> not know how to copy these structures to dissolve the
> sharing. I do not even know how to copy records.
> [...] How can I produce completely
> unshared structures?

Maybe i'm missing something, but if these are unmutable records, then why
do you need to concern yourself with any potential sharing?  As long as the
array cells are not "shared" -- which they can't be, as far as i know --
you can update each one individually no matter what the sharing status of
their contents is.

If the records *are* mutable, then the suggestion to use Array.init should
be sufficient.

Hoping i might save you some work :)

William


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

end of thread, other threads:[~2005-10-01 18:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <Pine.LNX.4.63.0509251653340.9226@localhost.localdomain>
2005-09-26 21:29 ` Ant: Re: [Caml-list] Avoiding shared data Martin Chabr
2005-09-26  8:17 William Lovas
2005-09-26 21:07 ` Ant: " Martin Chabr
2005-09-26 22:08   ` Jon Harrop
2005-09-30 22:57   ` Oliver Bandel
2005-10-01  0:07     ` Pal-Kristian Engstad
2005-10-01  5:46       ` Bill Wood
2005-10-01  8:27       ` Wolfgang Lux
2005-10-01 18:02         ` Wolfgang Lux
2005-10-01 12:34       ` Oliver Bandel
2005-10-01 13:58         ` Bill Wood

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 NNTP newsgroup(s).