On 14 Jan 2015 at 12:04, Gottlob Frege wrote:
The key really is PROGRESS rather than wait. A future wait() or get() halts PROGRESS of the calling EXECUTION CONTEXT
sure but how does it halt - via some kernel/system/library/... mechanism, or does it call ExecutionContext->WAIT()?
You may have noticed my functional composure based futures test code
a few weeks ago. These work by taking some arbitrary sequence of
callable types (held in a tuple
until the PROGRESS of some other EXECUTION CONTEXT calls promise.set_value() or set_exception().
until some other code does whatever it wants, setting whatever it wants, and calls ExecutionContext->RESUME()
ie separate the setting the value from the resuming of the execution.
(The tricky part: while still maintaining atomicity where necessary)
The functionally composed promise futures are probably too far out for the C++ community - I suspect even if I built them no one would use them. I am grateful to the discussions here for making me realise that though. Instead in AFIO I'll implement a non-allocating afio::future<T> and move onwards. No point flogging a dead horse here, besides I've had some surprising recent success with a test implementation of a fast (32784, 32768) SECDED error correcting code in software - I can process 500Mb/sec, pretty amazing considering it's all bit work, but to avoid pipeline stalls I need to combine the implementation with a crypto hash (probably Blake2) and thus that probably has ruled out my need for much faster futures which were originally demanded by my SIMD 4-SHA256 engine. Given that CPUs next year will do SHA256 in hardware, that renders that 4-SHA256 engine obsolete. Funny really. I wrote that 4-SHA256 engine whilst I was still working with you in BlackBerry. It's been a long road from then till now. Niall -- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/