[Top][All Lists]

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

Re: [gforth] Working example of tasker.fs use

From: Andrew Haley
Subject: Re: [gforth] Working example of tasker.fs use
Date: Tue, 16 Dec 2014 09:54:54 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

On 15/12/14 21:45, Bernd Paysan wrote:

> Actually, the right spec is to define an absolute deadline instead
> of a relative; we should do that with ns (ANS/Forth200x failed with
> MS); maybe the name might need to change (ABSTIME-NS? DEADLINE-NS?).
> pthreads AFAIK has one absolute deadline wait,
> pthread_cond_timedwait(), but it's still useless (it can't be
> combined with poll() to wait for other OS events; the only way to
> use it as such is to have a thread which waits on the OS, and then
> sends a condition to the thread which waits on abstime - that sounds
> stupid ;-).

Can't you combine absolute deadlines and poll() by setting a timer to
signal the thread?  But I'm not at all convinced by the idea of
multiplexing several streams with poll(), in any case.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]