Re: Threads, events, Win32, etc.

2004-11-19 Thread Gabe Schaffer
> [ long win32 proposal ] > > I've to read through that some more times. OK; let me know if you have any questions on how the Win32 stuff works. I tried to explain things that are unlike POSIX, but of course it makes sense to me. > Do you alread have ideas for a common API, or where to split the

Re: Threads, events, Win32, etc.

2004-11-17 Thread Leopold Toetsch
Gabe Schaffer <[EMAIL PROTECTED]> wrote: > Yes, there has to be a separate thread to get signals, and each thread > needs its own event queue, but why does the process have a global > event_queue? I suppose there are generic events that could be handled > just by the next thread to call check_even

Re: Threads, events, Win32, etc.

2004-11-17 Thread Gabe Schaffer
> >> Not quite. COND_WAIT takes an opaque type defined by the platform, that > >> happens to be a mutex for the pthreads based implementation. > > > It should, but it doesn't. Here's the definition: > > # define COND_WAIT(c,m) pthread_cond_wait(&c, &m) > > You are already in the POSIX specific p

Re: Threads, events, Win32, etc.

2004-11-16 Thread Leopold Toetsch
Gabe Schaffer <[EMAIL PROTECTED]> wrote: > On Mon, 15 Nov 2004 12:57:00 +0100, Leopold Toetsch <[EMAIL PROTECTED]> wrote: >> Gabe Schaffer <[EMAIL PROTECTED]> wrote: >> > * COND_WAIT takes a mutex because that's how pthreads works, but Win32 >> > condition variables (called "events") are kernel obj

Re: Threads, events, Win32, etc.

2004-11-16 Thread Gabe Schaffer
On Mon, 15 Nov 2004 12:57:00 +0100, Leopold Toetsch <[EMAIL PROTECTED]> wrote: > Gabe Schaffer <[EMAIL PROTECTED]> wrote: > > * COND_WAIT takes a mutex because that's how pthreads works, but Win32 > > condition variables (called "events") are kernel objects that do not > > require any other object

Re: Threads, events, Win32, etc.

2004-11-15 Thread Dan Sugalski
At 12:57 PM +0100 11/15/04, Leopold Toetsch wrote: Gabe Schaffer <[EMAIL PROTECTED]> wrote: I was just browsing the Parrot source, and noticed that the threading implementation is a bit Unix/pthread-centric. For example: * COND_WAIT takes a mutex because that's how pthreads works, but Win32 co

Re: Threads, events, Win32, etc.

2004-11-15 Thread Leopold Toetsch
Gabe Schaffer <[EMAIL PROTECTED]> wrote: > I was just browsing the Parrot source, and noticed that the threading > implementation is a bit Unix/pthread-centric. For example: > * COND_WAIT takes a mutex because that's how pthreads works, but Win32 > condition variables (called "events") are kernel