[hidden email] wrote:
>
> I think I misinterpreted this message the first time through. What
> David was saying is that positioning the stream to a certain location
> in the file doesn't help, because the other thread may come along and
> position it somewhere else. I don't know enough to say whether the
> read operation also repositions the "file pointer" in the stream, so
> to speak. Anyway, like I was saying in my last message, it sounds like
> an intermediary architecture might be necessary to make different
> threads play nice together with the same file.
Except you don't need to. It is not necassary for two threads to play
nicely together with the same shared data structure. Just don't share
the data structures. Copy them, and if you need to comunicate to
another thread, do it with messages between the threads. Shared data =
bad. :) As far as I know, programming languages that specialize on
concurrent programming take this approach; shared data not allowed. Any
speed gain made by sharing is lost again by having to use locking
mechanisms and detect deadlocks, etc. (with the exception of the case
where the data is read only).
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside