[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Diferent behaviour for Thread between Linux and Windows.
From: |
David Sugar |
Subject: |
Re: Diferent behaviour for Thread between Linux and Windows. |
Date: |
Tue, 15 Jun 2004 23:37:21 -0400 |
User-agent: |
KMail/1.6.2 |
I have implemented (in cvs) more code to create a better match to posix
cancellation point behavior for w32 targets, by making the timed isPending
functions and file operations act as cancellation points. There is now also
a generic wrapper function that can be used to simulate a cancellation point
around a common library function/system call that should act as one but
doesn't on it's own on a given target platform. Basically it promotes thread
cancellation to cancelImmediate for the function being wrapped to accomplish
this.
I have also tried testing the common c++ alternate signal based cancellation
for posix targets that do not have pthread_cancel capability as a means to
get around the broken macosx pthread implementations, but it seems that
pthread_kill may also be broken in macosx as the signal handler is never
invoked.
On Tuesday 15 June 2004 05:07 pm, Marcelo Dalmas wrote:
> On Mon, 14 Jun 2004 17:58:29 -0400
>
> David Sugar <address@hidden> wrote:
> > There are a couple of places that posix and w32 thread behavior
> > deviates.
>
> I think if Common C++ aims to be cross plataform then it must have the same
> behavior for all plataforms.
>
> > In the particular case of restarting threads, should they be
> > restartable? This seems like something that can be made to behave the
> > same on all platforms since I think it's just in the common c++
> > implementation that does this, and hence should only be necessary to
> > fix for one to behave the same as the other, whichever is deemed the
> > correct or most useful behavior.
>
> I'm sending a patch that modify w32's thread implementations to behave like
> Posix.
>
> I hope this help,