[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OO2C -> Debian?



> > 1. Which abtraction should be presented to the user?  That is, how
> > should the "Threads" module look like?
> 
> One should encapsulate common thread features like treaths itself but
> also semaphores, mutexes and that like in classes. The (first)
> implementation should be build upon POISX threads (as told), since they
> seem in fact widly available.
> 
> > 3. Which library modules have to be modified to be thread safe?
> 
> Just for the record: VisualOberon is currently not known to be
> thread safe. In fact I'm not sure what a library needs to do to be
> thread safe. I would be interested to discuss such topics in this
> mailing list. Exspecially for the current version of VO there is the
> problem, too, that X itself on most systems is *not* threadsafe.
> XFree86 can be made threadsafe but must be exspecially compiled for.

Generally, to be threadsafe, all shared resources such a hard disk
or a display (for VO) must be protected by semaphores (or some other
mechanism) so that threads won't get conflicting access to that
resource.  If VO has one thread managing the display which gets
queued messages from all the other threads writing to the display,
that would be one way to make VO thread-safe.  As I mentioned, memory
access is another area where the allocator has to be "thread-safe"
to prevent multiple threads getting the same block of memory and
other nasties.

Michael G.